home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / ddraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  107.4 KB  |  3,105 lines

  1. /*==========================================================================;
  2.  *
  3.  *  Copyright (C) 1994-1996 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       ddraw.h
  6.  *  Content:    DirectDraw include file
  7.  *
  8.  ***************************************************************************/
  9.  
  10. #ifndef __DDRAW_INCLUDED__
  11. #define __DDRAW_INCLUDED__
  12. #pragma option push -b
  13. #if defined( _WIN32 )  && !defined( _NO_COM )
  14. #define COM_NO_WINDOWS_H
  15. #include <objbase.h>
  16. #else
  17. #define IUnknown            void
  18. #define CO_E_NOTINITIALIZED 0x800401F0L
  19. #endif
  20.  
  21. #define _FACDD  0x876
  22. #define MAKE_DDHRESULT( code )  MAKE_HRESULT( 1, _FACDD, code )
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. /*
  29.  * GUIDS used by DirectDraw objects
  30.  */
  31. #if defined( _WIN32 ) && !defined( _NO_COM )
  32. DEFINE_GUID( CLSID_DirectDraw,                  0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
  33. DEFINE_GUID( CLSID_DirectDrawClipper,           0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
  34. DEFINE_GUID( IID_IDirectDraw,                   0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  35. DEFINE_GUID( IID_IDirectDraw2,                  0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  36. DEFINE_GUID( IID_IDirectDrawSurface,            0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  37. DEFINE_GUID( IID_IDirectDrawSurface2,           0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
  38.  
  39. DEFINE_GUID( IID_IDirectDrawPalette,            0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  40. DEFINE_GUID( IID_IDirectDrawClipper,            0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  41.  
  42. #endif
  43.  
  44. /*============================================================================
  45.  *
  46.  * DirectDraw Structures
  47.  *
  48.  * Various structures used to invoke DirectDraw.
  49.  *
  50.  *==========================================================================*/
  51.  
  52. struct IDirectDraw;
  53. struct IDirectDrawSurface;
  54. struct IDirectDrawPalette;
  55. struct IDirectDrawClipper;
  56.  
  57. typedef struct IDirectDraw                      FAR *LPDIRECTDRAW;
  58. typedef struct IDirectDraw2                     FAR *LPDIRECTDRAW2;
  59. typedef struct IDirectDrawSurface               FAR *LPDIRECTDRAWSURFACE;
  60. typedef struct IDirectDrawSurface2              FAR *LPDIRECTDRAWSURFACE2;
  61.  
  62. typedef struct IDirectDrawPalette               FAR *LPDIRECTDRAWPALETTE;
  63. typedef struct IDirectDrawClipper               FAR *LPDIRECTDRAWCLIPPER;
  64.  
  65. typedef struct _DDFXROP                 FAR *LPDDFXROP;
  66. typedef struct _DDSURFACEDESC           FAR *LPDDSURFACEDESC;
  67.  
  68. /*
  69.  * API's
  70.  */
  71. #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
  72. //#if defined( _WIN32 ) && !defined( _NO_ENUM )
  73.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  74.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  75.     extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  76.     extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  77.     #ifdef UNICODE
  78.         typedef LPDDENUMCALLBACKW       LPDDENUMCALLBACK;
  79.         #define DirectDrawEnumerate     DirectDrawEnumerateW
  80.     #else
  81.         typedef LPDDENUMCALLBACKA       LPDDENUMCALLBACK;
  82.         #define DirectDrawEnumerate     DirectDrawEnumerateA
  83.     #endif
  84.     extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  85.     extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
  86.     #ifdef WINNT
  87.         //This is the user-mode entry stub to the kernel mode procedure.
  88.         extern HRESULT NtDirectDrawCreate( GUID FAR *lpGUID, HANDLE *lplpDD, IUnknown FAR *pUnkOuter );
  89.     #endif
  90. #endif
  91.  
  92. #define REGSTR_KEY_DDHW_DESCRIPTION     "Description"
  93. #define REGSTR_KEY_DDHW_DRIVERNAME      "DriverName"
  94. #define REGSTR_PATH_DDHW                "Hardware\\DirectDrawDrivers"
  95.  
  96. #define DDCREATE_HARDWAREONLY           0x00000001l
  97. #define DDCREATE_EMULATIONONLY          0x00000002l
  98.  
  99. #ifdef WINNT
  100. typedef long HRESULT;
  101. #endif
  102.  
  103. //#ifndef WINNT
  104. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  105. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  106. //#endif
  107. /*
  108.  * DDCOLORKEY
  109.  */
  110. typedef struct _DDCOLORKEY
  111. {
  112.     DWORD       dwColorSpaceLowValue;   // low boundary of color space that is to 
  113.                                         // be treated as Color Key, inclusive
  114.     DWORD       dwColorSpaceHighValue;  // high boundary of color space that is 
  115.                                         // to be treated as Color Key, inclusive
  116. } DDCOLORKEY;
  117.  
  118. typedef DDCOLORKEY FAR* LPDDCOLORKEY;
  119.  
  120. /*
  121.  * DDBLTFX
  122.  * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  123.  */
  124. typedef struct _DDBLTFX
  125. {
  126.     DWORD       dwSize;                         // size of structure
  127.     DWORD       dwDDFX;                         // FX operations
  128.     DWORD       dwROP;                          // Win32 raster operations
  129.     DWORD       dwDDROP;                        // Raster operations new for DirectDraw
  130.     DWORD       dwRotationAngle;                // Rotation angle for blt
  131.     DWORD       dwZBufferOpCode;                // ZBuffer compares
  132.     DWORD       dwZBufferLow;                   // Low limit of Z buffer
  133.     DWORD       dwZBufferHigh;                  // High limit of Z buffer
  134.     DWORD       dwZBufferBaseDest;              // Destination base value
  135.     DWORD       dwZDestConstBitDepth;           // Bit depth used to specify Z constant for destination
  136.     union
  137.     {
  138.         DWORD   dwZDestConst;                   // Constant to use as Z buffer for dest
  139.         LPDIRECTDRAWSURFACE lpDDSZBufferDest;   // Surface to use as Z buffer for dest
  140.     };
  141.     DWORD       dwZSrcConstBitDepth;            // Bit depth used to specify Z constant for source
  142.     union
  143.     {
  144.         DWORD   dwZSrcConst;                    // Constant to use as Z buffer for src
  145.         LPDIRECTDRAWSURFACE lpDDSZBufferSrc;    // Surface to use as Z buffer for src
  146.     };
  147.     DWORD       dwAlphaEdgeBlendBitDepth;       // Bit depth used to specify constant for alpha edge blend
  148.     DWORD       dwAlphaEdgeBlend;               // Alpha for edge blending
  149.     DWORD       dwReserved;
  150.     DWORD       dwAlphaDestConstBitDepth;       // Bit depth used to specify alpha constant for destination
  151.     union
  152.     {
  153.         DWORD   dwAlphaDestConst;               // Constant to use as Alpha Channel
  154.         LPDIRECTDRAWSURFACE lpDDSAlphaDest;     // Surface to use as Alpha Channel
  155.     };
  156.     DWORD       dwAlphaSrcConstBitDepth;        // Bit depth used to specify alpha constant for source
  157.     union
  158.     {
  159.         DWORD   dwAlphaSrcConst;                // Constant to use as Alpha Channel
  160.         LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      // Surface to use as Alpha Channel
  161.     };
  162.     union
  163.     {
  164.         DWORD   dwFillColor;                    // color in RGB or Palettized
  165.         DWORD   dwFillDepth;                    // depth value for z-buffer
  166.         LPDIRECTDRAWSURFACE lpDDSPattern;       // Surface to use as pattern
  167.     };
  168.     DDCOLORKEY  ddckDestColorkey;               // DestColorkey override
  169.     DDCOLORKEY  ddckSrcColorkey;                // SrcColorkey override
  170. } DDBLTFX;
  171.  
  172. typedef DDBLTFX FAR* LPDDBLTFX;
  173.  
  174.  
  175. /*
  176.  * DDSCAPS
  177.  */
  178. typedef struct _DDSCAPS
  179. {
  180.     DWORD       dwCaps;         // capabilities of surface wanted
  181. } DDSCAPS;
  182.  
  183. typedef DDSCAPS FAR* LPDDSCAPS; 
  184.  
  185. /*
  186.  * DDCAPS
  187.  */
  188. #define DD_ROP_SPACE            (256/32)        // space required to store ROP array
  189.  
  190. typedef struct _DDCAPS
  191. {
  192.     DWORD       dwSize;                 // size of the DDDRIVERCAPS structure
  193.     DWORD       dwCaps;                 // driver specific capabilities
  194.     DWORD       dwCaps2;                // more driver specific capabilites
  195.     DWORD       dwCKeyCaps;             // color key capabilities of the surface
  196.     DWORD       dwFXCaps;               // driver specific stretching and effects capabilites
  197.     DWORD       dwFXAlphaCaps;          // alpha driver specific capabilities
  198.     DWORD       dwPalCaps;              // palette capabilities
  199.     DWORD       dwSVCaps;               // stereo vision capabilities
  200.     DWORD       dwAlphaBltConstBitDepths;       // DDBD_2,4,8
  201.     DWORD       dwAlphaBltPixelBitDepths;       // DDBD_1,2,4,8
  202.     DWORD       dwAlphaBltSurfaceBitDepths;     // DDBD_1,2,4,8
  203.     DWORD       dwAlphaOverlayConstBitDepths;   // DDBD_2,4,8
  204.     DWORD       dwAlphaOverlayPixelBitDepths;   // DDBD_1,2,4,8
  205.     DWORD       dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  206.     DWORD       dwZBufferBitDepths;             // DDBD_8,16,24,32
  207.     DWORD       dwVidMemTotal;          // total amount of video memory
  208.     DWORD       dwVidMemFree;           // amount of free video memory
  209.     DWORD       dwMaxVisibleOverlays;   // maximum number of visible overlays
  210.     DWORD       dwCurrVisibleOverlays;  // current number of visible overlays
  211.     DWORD       dwNumFourCCCodes;       // number of four cc codes
  212.     DWORD       dwAlignBoundarySrc;     // source rectangle alignment
  213.     DWORD       dwAlignSizeSrc;         // source rectangle byte size
  214.     DWORD       dwAlignBoundaryDest;    // dest rectangle alignment
  215.     DWORD       dwAlignSizeDest;        // dest rectangle byte size
  216.     DWORD       dwAlignStrideAlign;     // stride alignment
  217.     DWORD       dwRops[DD_ROP_SPACE];   // ROPS supported
  218.     DDSCAPS     ddsCaps;                // DDSCAPS structure has all the general capabilities
  219.     DWORD       dwMinOverlayStretch;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  220.     DWORD       dwMaxOverlayStretch;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  221.     DWORD       dwMinLiveVideoStretch;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  222.     DWORD       dwMaxLiveVideoStretch;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  223.     DWORD       dwMinHwCodecStretch;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  224.     DWORD       dwMaxHwCodecStretch;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  225.     DWORD       dwReserved1;            // reserved
  226.     DWORD       dwReserved2;            // reserved
  227.     DWORD       dwReserved3;            // reserved
  228.     DWORD       dwSVBCaps;              // driver specific capabilities for System->Vmem blts
  229.     DWORD       dwSVBCKeyCaps;          // driver color key capabilities for System->Vmem blts
  230.     DWORD       dwSVBFXCaps;            // driver FX capabilities for System->Vmem blts
  231.     DWORD       dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  232.     DWORD       dwVSBCaps;              // driver specific capabilities for Vmem->System blts
  233.     DWORD       dwVSBCKeyCaps;          // driver color key capabilities for Vmem->System blts
  234.     DWORD       dwVSBFXCaps;            // driver FX capabilities for Vmem->System blts
  235.     DWORD       dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  236.     DWORD       dwSSBCaps;              // driver specific capabilities for System->System blts
  237.     DWORD       dwSSBCKeyCaps;          // driver color key capabilities for System->System blts
  238.     DWORD       dwSSBFXCaps;            // driver FX capabilities for System->System blts
  239.     DWORD       dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  240.     DWORD       dwReserved4;            // reserved
  241.     DWORD       dwReserved5;            // reserved
  242.     DWORD       dwReserved6;            // reserved
  243. } DDCAPS;
  244.  
  245. typedef DDCAPS FAR* LPDDCAPS;
  246.  
  247.  
  248.  
  249. /*
  250.  * DDPIXELFORMAT
  251.  */
  252. typedef struct _DDPIXELFORMAT
  253. {
  254.     DWORD       dwSize;                 // size of structure
  255.     DWORD       dwFlags;                // pixel format flags
  256.     DWORD       dwFourCC;               // (FOURCC code)
  257.     union
  258.     {
  259.         DWORD   dwRGBBitCount;          // how many bits per pixel
  260.         DWORD   dwYUVBitCount;          // how many bits per pixel
  261.         DWORD   dwZBufferBitDepth;      // how many bits for z buffers
  262.         DWORD   dwAlphaBitDepth;        // how many bits for alpha channels
  263.     };
  264.     union
  265.     {
  266.         DWORD   dwRBitMask;             // mask for red bit
  267.         DWORD   dwYBitMask;             // mask for Y bits
  268.     };
  269.     union
  270.     {
  271.         DWORD   dwGBitMask;             // mask for green bits
  272.         DWORD   dwUBitMask;             // mask for U bits
  273.     };
  274.     union
  275.     {
  276.         DWORD   dwBBitMask;             // mask for blue bits
  277.         DWORD   dwVBitMask;             // mask for V bits
  278.     };
  279.     union
  280.     {
  281.         DWORD   dwRGBAlphaBitMask;      // mask for alpha channel
  282.         DWORD   dwYUVAlphaBitMask;      // mask for alpha channel
  283.     };
  284. } DDPIXELFORMAT;
  285.  
  286. typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
  287.  
  288. /*
  289.  * DDOVERLAYFX
  290.  */
  291. typedef struct _DDOVERLAYFX
  292. {
  293.     DWORD       dwSize;                         // size of structure
  294.     DWORD       dwAlphaEdgeBlendBitDepth;       // Bit depth used to specify constant for alpha edge blend
  295.     DWORD       dwAlphaEdgeBlend;               // Constant to use as alpha for edge blend
  296.     DWORD       dwReserved;
  297.     DWORD       dwAlphaDestConstBitDepth;       // Bit depth used to specify alpha constant for destination
  298.     union
  299.     {
  300.         DWORD   dwAlphaDestConst;               // Constant to use as alpha channel for dest
  301.         LPDIRECTDRAWSURFACE lpDDSAlphaDest;     // Surface to use as alpha channel for dest
  302.     };
  303.     DWORD       dwAlphaSrcConstBitDepth;        // Bit depth used to specify alpha constant for source
  304.     union
  305.     {
  306.         DWORD   dwAlphaSrcConst;                // Constant to use as alpha channel for src
  307.         LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      // Surface to use as alpha channel for src
  308.     };
  309.     DDCOLORKEY  dckDestColorkey;                // DestColorkey override
  310.     DDCOLORKEY  dckSrcColorkey;                 // DestColorkey override
  311.     DWORD       dwDDFX;                         // Overlay FX
  312.     DWORD       dwFlags;                        // flags
  313. } DDOVERLAYFX;
  314.  
  315. typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
  316.  
  317. /*
  318.  * DDBLTBATCH: BltBatch entry structure
  319.  */
  320. typedef struct _DDBLTBATCH
  321. {
  322.     LPRECT              lprDest;
  323.     LPDIRECTDRAWSURFACE lpDDSSrc;
  324.     LPRECT              lprSrc;
  325.     DWORD               dwFlags;
  326.     LPDDBLTFX           lpDDBltFx;
  327. } DDBLTBATCH;
  328.  
  329. typedef DDBLTBATCH FAR * LPDDBLTBATCH;
  330.  
  331. /*
  332.  * callbacks
  333.  */
  334. typedef DWORD   (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  335. #ifdef STREAMING
  336. typedef DWORD   (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  337. #endif
  338.  
  339.  
  340. /*
  341.  * INTERACES FOLLOW:
  342.  *      IDirectDraw
  343.  *      IDirectDrawClipper
  344.  *      IDirectDrawPalette
  345.  *      IDirectDrawSurface
  346.  */
  347.  
  348. /*
  349.  * IDirectDraw 
  350.  */
  351. #if defined( _WIN32 ) && !defined( _NO_COM )
  352. #undef INTERFACE
  353. #define INTERFACE IDirectDraw
  354. DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  355. {
  356.     /*** IUnknown methods ***/
  357.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  358.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  359.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  360.     /*** IDirectDraw methods ***/
  361.     STDMETHOD(Compact)(THIS) PURE;
  362.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  363.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  364.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  365.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  366.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  367.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  368.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  369.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  370.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  371.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  372.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  373.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  374.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  375.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  376.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  377.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  378.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  379.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
  380.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  381. };
  382.  
  383. #if !defined(__cplusplus) || defined(CINTERFACE)
  384. #define IDirectDraw_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  385. #define IDirectDraw_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  386. #define IDirectDraw_Release(p)                      (p)->lpVtbl->Release(p)
  387. #define IDirectDraw_Compact(p)                      (p)->lpVtbl->Compact(p)
  388. #define IDirectDraw_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  389. #define IDirectDraw_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  390. #define IDirectDraw_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  391. #define IDirectDraw_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  392. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  393. #define IDirectDraw_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  394. #define IDirectDraw_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  395. #define IDirectDraw_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  396. #define IDirectDraw_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  397. #define IDirectDraw_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  398. #define IDirectDraw_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  399. #define IDirectDraw_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  400. #define IDirectDraw_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  401. #define IDirectDraw_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  402. #define IDirectDraw_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  403. #define IDirectDraw_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  404. #define IDirectDraw_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  405. #define IDirectDraw_SetDisplayMode(p, a, b, c)      (p)->lpVtbl->SetDisplayMode(p, a, b, c)
  406. #define IDirectDraw_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  407. #endif
  408.  
  409. #endif
  410.  
  411. #if defined( _WIN32 ) && !defined( _NO_COM )
  412. #undef INTERFACE
  413. #define INTERFACE IDirectDraw2
  414. DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
  415. {
  416.     /*** IUnknown methods ***/
  417.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  418.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  419.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  420.     /*** IDirectDraw methods ***/
  421.     STDMETHOD(Compact)(THIS) PURE;
  422.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  423.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  424.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  425.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  426.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  427.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  428.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  429.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  430.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  431.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  432.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  433.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  434.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  435.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  436.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  437.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  438.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  439.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  440.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  441.     /*** Added in the v2 interface ***/
  442.     STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
  443. };
  444. #if !defined(__cplusplus) || defined(CINTERFACE)
  445. #define IDirectDraw2_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  446. #define IDirectDraw2_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  447. #define IDirectDraw2_Release(p)                      (p)->lpVtbl->Release(p)
  448. #define IDirectDraw2_Compact(p)                      (p)->lpVtbl->Compact(p)
  449. #define IDirectDraw2_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  450. #define IDirectDraw2_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  451. #define IDirectDraw2_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  452. #define IDirectDraw2_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  453. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  454. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  455. #define IDirectDraw2_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  456. #define IDirectDraw2_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  457. #define IDirectDraw2_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  458. #define IDirectDraw2_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  459. #define IDirectDraw2_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  460. #define IDirectDraw2_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  461. #define IDirectDraw2_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  462. #define IDirectDraw2_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  463. #define IDirectDraw2_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  464. #define IDirectDraw2_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  465. #define IDirectDraw2_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  466. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  467. #define IDirectDraw2_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  468. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c)  (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  469. #endif
  470.  
  471. #endif
  472.  
  473. /*
  474.  * IDirectDrawPalette
  475.  */
  476. #if defined( _WIN32 ) && !defined( _NO_COM )
  477. #undef INTERFACE
  478. #define INTERFACE IDirectDrawPalette
  479. DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  480. {
  481.     /*** IUnknown methods ***/
  482.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  483.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  484.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  485.     /*** IDirectDrawPalette methods ***/
  486.     STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  487.     STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  488.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  489.     STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  490. };
  491.  
  492. #if !defined(__cplusplus) || defined(CINTERFACE)
  493. #define IDirectDrawPalette_QueryInterface(p, a, b)      (p)->lpVtbl->QueryInterface(p, a, b)
  494. #define IDirectDrawPalette_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  495. #define IDirectDrawPalette_Release(p)                   (p)->lpVtbl->Release(p)
  496. #define IDirectDrawPalette_GetCaps(p, a)                (p)->lpVtbl->GetCaps(p, a)
  497. #define IDirectDrawPalette_GetEntries(p, a, b, c, d)    (p)->lpVtbl->GetEntries(p, a, b, c, d)
  498. #define IDirectDrawPalette_Initialize(p, a, b, c)       (p)->lpVtbl->Initialize(p, a, b, c)
  499. #define IDirectDrawPalette_SetEntries(p, a, b, c, d)    (p)->lpVtbl->SetEntries(p, a, b, c, d)
  500. #endif
  501.  
  502. #endif
  503.  
  504. /*
  505.  * IDirectDrawClipper
  506.  */
  507. #if defined( _WIN32 ) && !defined( _NO_COM )
  508. #undef INTERFACE
  509. #define INTERFACE IDirectDrawClipper
  510. DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  511. {
  512.     /*** IUnknown methods ***/
  513.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  514.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  515.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  516.     /*** IDirectDrawClipper methods ***/
  517.     STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
  518.     STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
  519.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
  520.     STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
  521.     STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
  522.     STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
  523. };
  524.  
  525. #if !defined(__cplusplus) || defined(CINTERFACE)
  526. #define IDirectDrawClipper_QueryInterface(p, a, b)  (p)->lpVtbl->QueryInterface(p, a, b)
  527. #define IDirectDrawClipper_AddRef(p)                (p)->lpVtbl->AddRef(p)
  528. #define IDirectDrawClipper_Release(p)               (p)->lpVtbl->Release(p)
  529. #define IDirectDrawClipper_GetClipList(p, a, b, c)  (p)->lpVtbl->GetClipList(p, a, b, c)
  530. #define IDirectDrawClipper_GetHWnd(p, a)            (p)->lpVtbl->GetHWnd(p, a)
  531. #define IDirectDrawClipper_Initialize(p, a, b)      (p)->lpVtbl->Initialize(p, a, b)
  532. #define IDirectDrawClipper_IsClipListChanged(p, a)  (p)->lpVtbl->IsClipListChanged(p, a)
  533. #define IDirectDrawClipper_SetClipList(p, a, b)     (p)->lpVtbl->SetClipList(p, a, b)
  534. #define IDirectDrawClipper_SetHWnd(p, a, b)         (p)->lpVtbl->SetHWnd(p, a, b)
  535. #endif
  536.  
  537. #endif
  538.  
  539. /*
  540.  * IDirectDrawSurface and related interfaces
  541.  */
  542. #if defined( _WIN32 ) && !defined( _NO_COM )
  543. #undef INTERFACE
  544. #define INTERFACE IDirectDrawSurface
  545. DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  546. {
  547.     /*** IUnknown methods ***/
  548.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  549.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  550.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  551.     /*** IDirectDrawSurface methods ***/
  552.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  553.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  554.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
  555.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  556.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
  557.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  558.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  559.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  560.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  561.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
  562.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  563.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  564.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  565.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  566.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  567.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  568.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  569.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  570.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  571.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  572.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  573.     STDMETHOD(IsLost)(THIS) PURE;
  574.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  575.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  576.     STDMETHOD(Restore)(THIS) PURE;
  577.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  578.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  579.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  580.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  581.     STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  582.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  583.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  584.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
  585. };
  586.  
  587. #if !defined(__cplusplus) || defined(CINTERFACE)
  588. #define IDirectDrawSurface_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  589. #define IDirectDrawSurface_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  590. #define IDirectDrawSurface_Release(p)                   (p)->lpVtbl->Release(p)
  591. #define IDirectDrawSurface_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  592. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  593. #define IDirectDrawSurface_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  594. #define IDirectDrawSurface_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  595. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  596. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  597. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  598. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  599. #define IDirectDrawSurface_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  600. #define IDirectDrawSurface_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  601. #define IDirectDrawSurface_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  602. #define IDirectDrawSurface_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  603. #define IDirectDrawSurface_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  604. #define IDirectDrawSurface_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  605. #define IDirectDrawSurface_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  606. #define IDirectDrawSurface_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  607. #define IDirectDrawSurface_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  608. #define IDirectDrawSurface_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  609. #define IDirectDrawSurface_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  610. #define IDirectDrawSurface_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  611. #define IDirectDrawSurface_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  612. #define IDirectDrawSurface_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  613. #define IDirectDrawSurface_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  614. #define IDirectDrawSurface_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  615. #define IDirectDrawSurface_Restore(p)                   (p)->lpVtbl->Restore(p)
  616. #define IDirectDrawSurface_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  617. #define IDirectDrawSurface_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  618. #define IDirectDrawSurface_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  619. #define IDirectDrawSurface_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  620. #define IDirectDrawSurface_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  621. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  622. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  623. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  624. #endif
  625.  
  626. /*
  627.  * IDirectDrawSurface2 and related interfaces
  628.  */
  629. #undef INTERFACE
  630. #define INTERFACE IDirectDrawSurface2
  631. DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
  632. {
  633.     /*** IUnknown methods ***/
  634.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  635.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  636.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  637.     /*** IDirectDrawSurface methods ***/
  638.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
  639.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  640.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
  641.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  642.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
  643.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
  644.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  645.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  646.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
  647.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
  648.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  649.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  650.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  651.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  652.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  653.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  654.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  655.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  656.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  657.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  658.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  659.     STDMETHOD(IsLost)(THIS) PURE;
  660.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  661.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  662.     STDMETHOD(Restore)(THIS) PURE;
  663.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  664.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  665.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  666.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  667.     STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  668.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  669.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  670.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
  671.     /*** Added in the v2 interface ***/
  672.     STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  673.     STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  674.     STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  675. };
  676.  
  677. #if !defined(__cplusplus) || defined(CINTERFACE)
  678. #define IDirectDrawSurface2_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  679. #define IDirectDrawSurface2_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  680. #define IDirectDrawSurface2_Release(p)                   (p)->lpVtbl->Release(p)
  681. #define IDirectDrawSurface2_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  682. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  683. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  684. #define IDirectDrawSurface2_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  685. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  686. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  687. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  688. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  689. #define IDirectDrawSurface2_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  690. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  691. #define IDirectDrawSurface2_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  692. #define IDirectDrawSurface2_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  693. #define IDirectDrawSurface2_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  694. #define IDirectDrawSurface2_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  695. #define IDirectDrawSurface2_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  696. #define IDirectDrawSurface2_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  697. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  698. #define IDirectDrawSurface2_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  699. #define IDirectDrawSurface2_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  700. #define IDirectDrawSurface2_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  701. #define IDirectDrawSurface2_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  702. #define IDirectDrawSurface2_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  703. #define IDirectDrawSurface2_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  704. #define IDirectDrawSurface2_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  705. #define IDirectDrawSurface2_Restore(p)                   (p)->lpVtbl->Restore(p)
  706. #define IDirectDrawSurface2_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  707. #define IDirectDrawSurface2_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  708. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  709. #define IDirectDrawSurface2_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  710. #define IDirectDrawSurface2_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  711. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  712. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  713. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  714. #define IDirectDrawSurface2_GetDDInterface(p,a)          (p)->lpVtbl->GetDDInterface(p,a)
  715. #define IDirectDrawSurface2_PageLock(p,a)                (p)->lpVtbl->PageLock(p,a)
  716. #define IDirectDrawSurface2_PageUnlock(p,a)              (p)->lpVtbl->PageUnlock(p,a)
  717. #endif
  718.  
  719.  
  720. #endif
  721.  
  722.  
  723. /*
  724.  * DDSURFACEDESC
  725.  */
  726. typedef struct _DDSURFACEDESC
  727. {
  728.     DWORD               dwSize;                 // size of the DDSURFACEDESC structure
  729.     DWORD               dwFlags;                // determines what fields are valid
  730.     DWORD               dwHeight;               // height of surface to be created
  731.     DWORD               dwWidth;                // width of input surface
  732.     LONG                lPitch;                 // distance to start of next line (return value only)
  733.     DWORD               dwBackBufferCount;      // number of back buffers requested
  734.     union
  735.     {
  736.         DWORD           dwMipMapCount;          // number of mip-map levels requested
  737.         DWORD           dwZBufferBitDepth;      // depth of Z buffer requested
  738.         DWORD           dwRefreshRate;          // refresh rate (used when display mode is described)
  739.     };
  740.     DWORD               dwAlphaBitDepth;        // depth of alpha buffer requested
  741.     DWORD               dwReserved;             // reserved
  742.     LPVOID              lpSurface;              // pointer to the associated surface memory
  743.     DDCOLORKEY          ddckCKDestOverlay;      // color key for destination overlay use
  744.     DDCOLORKEY          ddckCKDestBlt;          // color key for destination blt use
  745.     DDCOLORKEY          ddckCKSrcOverlay;       // color key for source overlay use
  746.     DDCOLORKEY          ddckCKSrcBlt;           // color key for source blt use
  747.     DDPIXELFORMAT       ddpfPixelFormat;        // pixel format description of the surface
  748.     DDSCAPS             ddsCaps;                // direct draw surface capabilities
  749. } DDSURFACEDESC;
  750.  
  751. /*
  752.  * ddsCaps field is valid.
  753.  */
  754. #define DDSD_CAPS               0x00000001l     // default
  755.  
  756. /*
  757.  * dwHeight field is valid.
  758.  */
  759. #define DDSD_HEIGHT             0x00000002l
  760.  
  761. /*
  762.  * dwWidth field is valid.
  763.  */
  764. #define DDSD_WIDTH              0x00000004l
  765.  
  766. /*
  767.  * lPitch is valid.
  768.  */
  769. #define DDSD_PITCH              0x00000008l
  770.  
  771. /*
  772.  * dwBackBufferCount is valid.
  773.  */
  774. #define DDSD_BACKBUFFERCOUNT    0x00000020l
  775.  
  776. /*
  777.  * dwZBufferBitDepth is valid.
  778.  */
  779. #define DDSD_ZBUFFERBITDEPTH    0x00000040l
  780.  
  781. /*
  782.  * dwAlphaBitDepth is valid.
  783.  */
  784. #define DDSD_ALPHABITDEPTH      0x00000080l
  785.  
  786.  
  787.  
  788. /*
  789.  * ddpfPixelFormat is valid.
  790.  */
  791. #define DDSD_PIXELFORMAT        0x00001000l
  792.  
  793. /*
  794.  * ddckCKDestOverlay is valid.
  795.  */
  796. #define DDSD_CKDESTOVERLAY      0x00002000l
  797.  
  798. /*
  799.  * ddckCKDestBlt is valid.
  800.  */
  801. #define DDSD_CKDESTBLT          0x00004000l
  802.  
  803. /*
  804.  * ddckCKSrcOverlay is valid.
  805.  */
  806. #define DDSD_CKSRCOVERLAY       0x00008000l
  807.  
  808. /*
  809.  * ddckCKSrcBlt is valid.
  810.  */
  811. #define DDSD_CKSRCBLT           0x00010000l
  812.  
  813. /*
  814.  * dwMipMapCount is valid.
  815.  */
  816. #define DDSD_MIPMAPCOUNT        0x00020000l
  817.  
  818.  /*
  819.   * dwRefreshRate is valid
  820.   */
  821. #define DDSD_REFRESHRATE        0x00040000l
  822.  
  823.  
  824. /*
  825.  * All input fields are valid. 
  826.  */
  827. #define DDSD_ALL                0x0007f9eel
  828.  
  829.  
  830. /*============================================================================
  831.  *
  832.  * Direct Draw Capability Flags
  833.  *
  834.  * These flags are used to describe the capabilities of a given Surface.
  835.  * All flags are bit flags. 
  836.  *
  837.  *==========================================================================*/
  838.  
  839. /****************************************************************************
  840.  *
  841.  * DIRECTDRAWSURFACE CAPABILITY FLAGS
  842.  *
  843.  ****************************************************************************/
  844. /*
  845.  * This bit currently has no meaning.
  846.  */
  847. #define DDSCAPS_3D                              0x00000001l
  848.  
  849. /*
  850.  * Indicates that this surface contains alpha information.  The pixel
  851.  * format must be interrogated to determine whether this surface
  852.  * contains only alpha information or alpha information interlaced
  853.  * with pixel color data (e.g. RGBA or YUVA).
  854.  */
  855. #define DDSCAPS_ALPHA                           0x00000002l
  856.  
  857. /*
  858.  * Indicates that this surface is a backbuffer.  It is generally
  859.  * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  860.  * It indicates that this surface is THE back buffer of a surface
  861.  * flipping structure.  DirectDraw supports N surfaces in a
  862.  * surface flipping structure.  Only the surface that immediately
  863.  * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  864.  * The other surfaces are identified as back buffers by the presence
  865.  * of the DDSCAPS_FLIP capability, their attachment order, and the
  866.  * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  867.  * capabilities.  The bit is sent to CreateSurface when a standalone
  868.  * back buffer is being created.  This surface could be attached to
  869.  * a front buffer and/or back buffers to form a flipping surface
  870.  * structure after the CreateSurface call.  See AddAttachments for
  871.  * a detailed description of the behaviors in this case.
  872.  */
  873. #define DDSCAPS_BACKBUFFER                      0x00000004l
  874.  
  875. /*
  876.  * Indicates a complex surface structure is being described.  A
  877.  * complex surface structure results in the creation of more than
  878.  * one surface.  The additional surfaces are attached to the root
  879.  * surface.  The complex structure can only be destroyed by
  880.  * destroying the root.
  881.  */
  882. #define DDSCAPS_COMPLEX                         0x00000008l
  883.  
  884. /*
  885.  * Indicates that this surface is a part of a surface flipping structure.
  886.  * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  887.  * DDSCAP_BACKBUFFER bits are not set.  They are set by CreateSurface
  888.  * on the resulting creations.  The dwBackBufferCount field in the
  889.  * DDSURFACEDESC structure must be set to at least 1 in order for
  890.  * the CreateSurface call to succeed.  The DDSCAPS_COMPLEX capability
  891.  * must always be set with creating multiple surfaces through CreateSurface.
  892.  */
  893. #define DDSCAPS_FLIP                            0x00000010l
  894.  
  895. /*
  896.  * Indicates that this surface is THE front buffer of a surface flipping
  897.  * structure.  It is generally set by CreateSurface when the DDSCAPS_FLIP
  898.  * capability bit is set.
  899.  * If this capability is sent to CreateSurface then a standalonw front buffer
  900.  * is created.  This surface will not have the DDSCAPS_FLIP capability.
  901.  * It can be attached to other back buffers to form a flipping structure.
  902.  * See AddAttachments for a detailed description of the behaviors in this
  903.  * case.
  904.  */
  905. #define DDSCAPS_FRONTBUFFER                     0x00000020l
  906.  
  907. /*
  908.  * Indicates that this surface is any offscreen surface that is not an overlay,
  909.  * texture, zbuffer, front buffer, back buffer, or alpha surface.  It is used
  910.  * to identify plain vanilla surfaces.
  911.  */
  912. #define DDSCAPS_OFFSCREENPLAIN                  0x00000040l
  913.  
  914. /*
  915.  * Indicates that this surface is an overlay.  It may or may not be directly visible
  916.  * depending on whether or not it is currently being overlayed onto the primary 
  917.  * surface.  DDSCAPS_VISIBLE can be used to determine whether or not it is being 
  918.  * overlayed at the moment. 
  919.  */
  920. #define DDSCAPS_OVERLAY                         0x00000080l
  921.  
  922. /*
  923.  * Indicates that unique DirectDrawPalette objects can be created and
  924.  * attached to this surface.
  925.  */
  926. #define DDSCAPS_PALETTE                         0x00000100l
  927.  
  928. /*
  929.  * Indicates that this surface is the primary surface.  The primary
  930.  * surface represents what the user is seeing at the moment.
  931.  */
  932. #define DDSCAPS_PRIMARYSURFACE                  0x00000200l
  933.  
  934. /*
  935.  * Indicates that this surface is the primary surface for the left eye.
  936.  * The primary surface for the left eye represents what the user is seeing
  937.  * at the moment with the users left eye.  When this surface is created the
  938.  * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
  939.  * right eye.
  940.  */
  941. #define DDSCAPS_PRIMARYSURFACELEFT              0x00000400l
  942.  
  943. /*
  944.  * Indicates that this surface memory was allocated in system memory
  945.  */
  946. #define DDSCAPS_SYSTEMMEMORY                    0x00000800l
  947.  
  948. /*
  949.  * Indicates that this surface can be used as a 3D texture.  It does not
  950.  * indicate whether or not the surface is being used for that purpose.
  951.  */
  952. #define DDSCAPS_TEXTURE                         0x00001000l
  953.  
  954. /*
  955.  * Indicates that a surface may be a destination for 3D rendering.  This
  956.  * bit must be set in order to query for a Direct3D Device Interface 
  957.  * from this surface.
  958.  */
  959. #define DDSCAPS_3DDEVICE                        0x00002000l
  960.  
  961. /*
  962.  * Indicates that this surface exists in video memory.
  963.  */
  964. #define DDSCAPS_VIDEOMEMORY                     0x00004000l
  965.  
  966. /*
  967.  * Indicates that changes made to this surface are immediately visible.  
  968.  * It is always set for the primary surface and is set for overlays while
  969.  * they are being overlayed and texture maps while they are being textured.
  970.  */
  971. #define DDSCAPS_VISIBLE                         0x00008000l
  972.  
  973. /*
  974.  * Indicates that only writes are permitted to the surface.  Read accesses 
  975.  * from the surface may or may not generate a protection fault, but the 
  976.  * results of a read from this surface will not be meaningful.  READ ONLY.
  977.  */
  978. #define DDSCAPS_WRITEONLY                       0x00010000l
  979.  
  980. /*
  981.  * Indicates that this surface is a z buffer. A z buffer does not contain
  982.  * displayable information.  Instead it contains bit depth information that is
  983.  * used to determine which pixels are visible and which are obscured. 
  984.  */
  985. #define DDSCAPS_ZBUFFER                         0x00020000l
  986.  
  987. /*
  988.  * Indicates surface will have a DC associated long term
  989.  */
  990. #define DDSCAPS_OWNDC                           0x00040000l
  991.  
  992. /*
  993.  * Indicates surface should be able to receive live video
  994.  */
  995. #define DDSCAPS_LIVEVIDEO                       0x00080000l
  996.  
  997. /*
  998.  * Indicates surface should be able to have a stream decompressed
  999.  * to it by the hardware.
  1000.  */
  1001. #define DDSCAPS_HWCODEC                         0x00100000l
  1002.  
  1003. /*
  1004.  * Surface is a 320x200 or 320x240 ModeX surface
  1005.  */
  1006. #define DDSCAPS_MODEX                           0x00200000l
  1007.  
  1008. /*
  1009.  * Indicates surface is one level of a mip-map. This surface will
  1010.  * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
  1011.  * This can be done explicitly, by creating a number of surfaces and
  1012.  * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
  1013.  * If this bit is set then DDSCAPS_TEXTURE must also be set.
  1014.  */
  1015. #define DDSCAPS_MIPMAP                          0x00400000l
  1016.  
  1017.  
  1018.  
  1019. /*
  1020.  * Indicates that memory for the surface is not allocated until the surface
  1021.  * is loaded (via the Direct3D texture Load() function).
  1022.  */
  1023. #define DDSCAPS_ALLOCONLOAD                     0x04000000l
  1024.  
  1025.  
  1026.  
  1027.  /****************************************************************************
  1028.  *
  1029.  * DIRECTDRAW DRIVER CAPABILITY FLAGS
  1030.  *
  1031.  ****************************************************************************/
  1032.  
  1033. /*
  1034.  * Display hardware has 3D acceleration.
  1035.  */
  1036. #define DDCAPS_3D                       0x00000001l
  1037.  
  1038. /*
  1039.  * Indicates that DirectDraw will support only dest rectangles that are aligned
  1040.  * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  1041.  * READ ONLY.
  1042.  */
  1043. #define DDCAPS_ALIGNBOUNDARYDEST        0x00000002l
  1044.  
  1045. /*
  1046.  * Indicates that DirectDraw will support only source rectangles  whose sizes in 
  1047.  * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively.  READ ONLY.
  1048.  */
  1049. #define DDCAPS_ALIGNSIZEDEST            0x00000004l
  1050. /*
  1051.  * Indicates that DirectDraw will support only source rectangles that are aligned
  1052.  * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  1053.  * READ ONLY.
  1054.  */
  1055. #define DDCAPS_ALIGNBOUNDARYSRC         0x00000008l
  1056.  
  1057. /*
  1058.  * Indicates that DirectDraw will support only source rectangles  whose sizes in 
  1059.  * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively.  READ ONLY.
  1060.  */
  1061. #define DDCAPS_ALIGNSIZESRC             0x00000010l
  1062.  
  1063. /*
  1064.  * Indicates that DirectDraw will create video memory surfaces that have a stride 
  1065.  * alignment equal to DIRECTDRAWCAPS.dwAlignStride.  READ ONLY.
  1066.  */
  1067. #define DDCAPS_ALIGNSTRIDE              0x00000020l
  1068.  
  1069. /*
  1070.  * Display hardware is capable of blt operations.
  1071.  */
  1072. #define DDCAPS_BLT                      0x00000040l
  1073.  
  1074. /*
  1075.  * Display hardware is capable of asynchronous blt operations.
  1076.  */
  1077. #define DDCAPS_BLTQUEUE                 0x00000080l
  1078.  
  1079. /*
  1080.  * Display hardware is capable of color space conversions during the blt operation.
  1081.  */
  1082. #define DDCAPS_BLTFOURCC                0x00000100l
  1083.  
  1084. /*
  1085.  * Display hardware is capable of stretching during blt operations.
  1086.  */
  1087. #define DDCAPS_BLTSTRETCH               0x00000200l
  1088.  
  1089. /*
  1090.  * Display hardware is shared with GDI.
  1091.  */
  1092. #define DDCAPS_GDI                      0x00000400l
  1093.  
  1094. /*
  1095.  * Display hardware can overlay.
  1096.  */
  1097. #define DDCAPS_OVERLAY                  0x00000800l
  1098.  
  1099. /*
  1100.  * Set if display hardware supports overlays but can not clip them.
  1101.  */
  1102. #define DDCAPS_OVERLAYCANTCLIP          0x00001000l
  1103.  
  1104. /*
  1105.  * Indicates that overlay hardware is capable of color space conversions during
  1106.  * the overlay operation.
  1107.  */
  1108. #define DDCAPS_OVERLAYFOURCC            0x00002000l
  1109.  
  1110. /*
  1111.  * Indicates that stretching can be done by the overlay hardware.
  1112.  */
  1113. #define DDCAPS_OVERLAYSTRETCH           0x00004000l
  1114.  
  1115. /*
  1116.  * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  1117.  * other than the primary surface.
  1118.  */
  1119. #define DDCAPS_PALETTE                  0x00008000l
  1120.  
  1121. /*
  1122.  * Indicates that palette changes can be syncd with the veritcal refresh.
  1123.  */
  1124. #define DDCAPS_PALETTEVSYNC             0x00010000l
  1125.  
  1126. /*
  1127.  * Display hardware can return the current scan line.
  1128.  */
  1129. #define DDCAPS_READSCANLINE             0x00020000l
  1130.  
  1131. /*
  1132.  * Display hardware has stereo vision capabilities.  DDSCAPS_PRIMARYSURFACELEFT 
  1133.  * can be created.
  1134.  */
  1135. #define DDCAPS_STEREOVIEW               0x00040000l
  1136.  
  1137. /*
  1138.  * Display hardware is capable of generating a vertical blank interrupt.
  1139.  */
  1140. #define DDCAPS_VBI                      0x00080000l
  1141.  
  1142. /*
  1143.  * Supports the use of z buffers with blt operations.
  1144.  */
  1145. #define DDCAPS_ZBLTS                    0x00100000l
  1146.  
  1147. /*
  1148.  * Supports Z Ordering of overlays.
  1149.  */
  1150. #define DDCAPS_ZOVERLAYS                0x00200000l
  1151.  
  1152. /*
  1153.  * Supports color key
  1154.  */
  1155. #define DDCAPS_COLORKEY                 0x00400000l
  1156.  
  1157. /*
  1158.  * Supports alpha surfaces
  1159.  */
  1160. #define DDCAPS_ALPHA                    0x00800000l
  1161.  
  1162. /*
  1163.  * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  1164.  */
  1165. #define DDCAPS_COLORKEYHWASSIST         0x01000000l
  1166.  
  1167. /*
  1168.  * no hardware support at all
  1169.  */
  1170. #define DDCAPS_NOHARDWARE               0x02000000l
  1171.  
  1172. /*
  1173.  * Display hardware is capable of color fill with bltter
  1174.  */
  1175. #define DDCAPS_BLTCOLORFILL             0x04000000l
  1176.  
  1177. /*
  1178.  * Display hardware is bank switched, and potentially very slow at
  1179.  * random access to VRAM.
  1180.  */
  1181. #define DDCAPS_BANKSWITCHED             0x08000000l
  1182.  
  1183. /*
  1184.  * Display hardware is capable of depth filling Z-buffers with bltter
  1185.  */
  1186. #define DDCAPS_BLTDEPTHFILL             0x10000000l
  1187.  
  1188. /*
  1189.  * Display hardware is capable of clipping while bltting.
  1190.  */
  1191. #define DDCAPS_CANCLIP                  0x20000000l
  1192.  
  1193. /*
  1194.  * Display hardware is capable of clipping while stretch bltting.
  1195.  */
  1196. #define DDCAPS_CANCLIPSTRETCHED         0x40000000l
  1197.  
  1198. /*
  1199.  * Display hardware is capable of bltting to or from system memory
  1200.  */
  1201. #define DDCAPS_CANBLTSYSMEM             0x80000000l
  1202.  
  1203.  
  1204.  /****************************************************************************
  1205.  *
  1206.  * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  1207.  *
  1208.  ****************************************************************************/
  1209.  
  1210. /*
  1211.  * Display hardware is certified
  1212.  */
  1213. #define DDCAPS2_CERTIFIED               0x00000001l
  1214.  
  1215. /*
  1216.  * Driver cannot interleave 2D operations (lock and blt) to surfaces with
  1217.  * Direct3D rendering operations between calls to BeginScene() and EndScene()
  1218.  */
  1219. #define DDCAPS2_NO2DDURING3DSCENE       0x00000002l
  1220.  
  1221. /****************************************************************************
  1222.  *
  1223.  * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  1224.  *
  1225.  ****************************************************************************/
  1226.  
  1227. /*
  1228.  * Supports alpha blending around the edge of a source color keyed surface.
  1229.  * For Blt.
  1230.  */
  1231. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND         0x00000001l
  1232.  
  1233. /*
  1234.  * Supports alpha information in the pixel format.  The bit depth of alpha 
  1235.  * information in the pixel format can be 1,2,4, or 8.  The alpha value becomes
  1236.  * more opaque as the alpha value increases.  (0 is transparent.)
  1237.  * For Blt.
  1238.  */
  1239. #define DDFXALPHACAPS_BLTALPHAPIXELS            0x00000002l
  1240.  
  1241. /*
  1242.  * Supports alpha information in the pixel format.  The bit depth of alpha 
  1243.  * information in the pixel format can be 1,2,4, or 8.  The alpha value 
  1244.  * becomes more transparent as the alpha value increases.  (0 is opaque.) 
  1245.  * This flag can only be set if DDCAPS_ALPHA is set.
  1246.  * For Blt.
  1247.  */
  1248. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG         0x00000004l
  1249.  
  1250. /*
  1251.  * Supports alpha only surfaces.  The bit depth of an alpha only surface can be
  1252.  * 1,2,4, or 8.  The alpha value becomes more opaque as the alpha value increases.
  1253.  * (0 is transparent.)
  1254.  * For Blt.
  1255.  */
  1256. #define DDFXALPHACAPS_BLTALPHASURFACES          0x00000008l
  1257.  
  1258. /*
  1259.  * The depth of the alpha channel data can range can be 1,2,4, or 8.  
  1260.  * The NEG suffix indicates that this alpha channel becomes more transparent
  1261.  * as the alpha value increases. (0 is opaque.)  This flag can only be set if
  1262.  * DDCAPS_ALPHA is set.
  1263.  * For Blt.
  1264.  */
  1265. #define DDFXALPHACAPS_BLTALPHASURFACESNEG       0x00000010l
  1266.  
  1267. /*
  1268.  * Supports alpha blending around the edge of a source color keyed surface.
  1269.  * For Overlays.
  1270.  */
  1271. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND     0x00000020l
  1272.  
  1273. /*
  1274.  * Supports alpha information in the pixel format.  The bit depth of alpha 
  1275.  * information in the pixel format can be 1,2,4, or 8.  The alpha value becomes
  1276.  * more opaque as the alpha value increases.  (0 is transparent.)
  1277.  * For Overlays.
  1278.  */
  1279. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS        0x00000040l
  1280.  
  1281. /*
  1282.  * Supports alpha information in the pixel format.  The bit depth of alpha 
  1283.  * information in the pixel format can be 1,2,4, or 8.  The alpha value 
  1284.  * becomes more transparent as the alpha value increases.  (0 is opaque.) 
  1285.  * This flag can only be set if DDCAPS_ALPHA is set.
  1286.  * For Overlays.
  1287.  */
  1288. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG     0x00000080l
  1289.  
  1290. /*
  1291.  * Supports alpha only surfaces.  The bit depth of an alpha only surface can be
  1292.  * 1,2,4, or 8.  The alpha value becomes more opaque as the alpha value increases.
  1293.  * (0 is transparent.)
  1294.  * For Overlays.
  1295.  */
  1296. #define DDFXALPHACAPS_OVERLAYALPHASURFACES      0x00000100l
  1297.  
  1298. /*
  1299.  * The depth of the alpha channel data can range can be 1,2,4, or 8.  
  1300.  * The NEG suffix indicates that this alpha channel becomes more transparent
  1301.  * as the alpha value increases. (0 is opaque.)  This flag can only be set if
  1302.  * DDCAPS_ALPHA is set.
  1303.  * For Overlays.
  1304.  */
  1305. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG   0x00000200l
  1306.  
  1307. /****************************************************************************
  1308.  *
  1309.  * DIRECTDRAW FX CAPABILITY FLAGS
  1310.  *
  1311.  ****************************************************************************/
  1312.  
  1313. /*
  1314.  * Uses arithmetic operations to stretch and shrink surfaces during blt
  1315.  * rather than pixel doubling techniques.  Along the Y axis.
  1316.  */
  1317. #define DDFXCAPS_BLTARITHSTRETCHY       0x00000020l
  1318.  
  1319. /*
  1320.  * Uses arithmetic operations to stretch during blt
  1321.  * rather than pixel doubling techniques.  Along the Y axis. Only
  1322.  * works for x1, x2, etc.
  1323.  */
  1324. #define DDFXCAPS_BLTARITHSTRETCHYN      0x00000010l
  1325.  
  1326. /*
  1327.  * Supports mirroring left to right in blt.
  1328.  */
  1329. #define DDFXCAPS_BLTMIRRORLEFTRIGHT     0x00000040l
  1330.  
  1331. /*
  1332.  * Supports mirroring top to bottom in blt.
  1333.  */
  1334. #define DDFXCAPS_BLTMIRRORUPDOWN        0x00000080l
  1335.  
  1336. /*
  1337.  * Supports arbitrary rotation for blts.
  1338.  */
  1339. #define DDFXCAPS_BLTROTATION            0x00000100l
  1340.  
  1341. /*
  1342.  * Supports 90 degree rotations for blts.
  1343.  */
  1344. #define DDFXCAPS_BLTROTATION90          0x00000200l
  1345.  
  1346. /*
  1347.  * DirectDraw supports arbitrary shrinking of a surface along the
  1348.  * x axis (horizontal direction) for blts.
  1349.  */
  1350. #define DDFXCAPS_BLTSHRINKX             0x00000400l
  1351.  
  1352. /*
  1353.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1354.  * along the x axis (horizontal direction) for blts.
  1355.  */
  1356. #define DDFXCAPS_BLTSHRINKXN            0x00000800l
  1357.  
  1358. /*
  1359.  * DirectDraw supports arbitrary shrinking of a surface along the
  1360.  * y axis (horizontal direction) for blts.  
  1361.  */
  1362. #define DDFXCAPS_BLTSHRINKY             0x00001000l
  1363.  
  1364. /*
  1365.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1366.  * along the y axis (vertical direction) for blts.  
  1367.  */
  1368. #define DDFXCAPS_BLTSHRINKYN            0x00002000l
  1369.  
  1370. /*
  1371.  * DirectDraw supports arbitrary stretching of a surface along the
  1372.  * x axis (horizontal direction) for blts.
  1373.  */
  1374. #define DDFXCAPS_BLTSTRETCHX            0x00004000l
  1375.  
  1376. /*
  1377.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  1378.  * along the x axis (horizontal direction) for blts.
  1379.  */
  1380. #define DDFXCAPS_BLTSTRETCHXN           0x00008000l
  1381.  
  1382. /*
  1383.  * DirectDraw supports arbitrary stretching of a surface along the
  1384.  * y axis (horizontal direction) for blts.  
  1385.  */
  1386. #define DDFXCAPS_BLTSTRETCHY            0x00010000l
  1387.  
  1388. /*
  1389.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  1390.  * along the y axis (vertical direction) for blts.  
  1391.  */
  1392. #define DDFXCAPS_BLTSTRETCHYN           0x00020000l
  1393.  
  1394. /*
  1395.  * Uses arithmetic operations to stretch and shrink surfaces during 
  1396.  * overlay rather than pixel doubling techniques.  Along the Y axis 
  1397.  * for overlays.
  1398.  */
  1399. #define DDFXCAPS_OVERLAYARITHSTRETCHY   0x00040000l
  1400.  
  1401. /*
  1402.  * Uses arithmetic operations to stretch surfaces during 
  1403.  * overlay rather than pixel doubling techniques.  Along the Y axis 
  1404.  * for overlays. Only works for x1, x2, etc.
  1405.  */
  1406. #define DDFXCAPS_OVERLAYARITHSTRETCHYN  0x00000008l
  1407.  
  1408. /*
  1409.  * DirectDraw supports arbitrary shrinking of a surface along the
  1410.  * x axis (horizontal direction) for overlays.
  1411.  */
  1412. #define DDFXCAPS_OVERLAYSHRINKX         0x00080000l
  1413.  
  1414. /*
  1415.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1416.  * along the x axis (horizontal direction) for overlays.
  1417.  */
  1418. #define DDFXCAPS_OVERLAYSHRINKXN        0x00100000l
  1419.  
  1420. /*
  1421.  * DirectDraw supports arbitrary shrinking of a surface along the
  1422.  * y axis (horizontal direction) for overlays.  
  1423.  */
  1424. #define DDFXCAPS_OVERLAYSHRINKY         0x00200000l
  1425.  
  1426. /*
  1427.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1428.  * along the y axis (vertical direction) for overlays.  
  1429.  */
  1430. #define DDFXCAPS_OVERLAYSHRINKYN        0x00400000l
  1431.  
  1432. /*
  1433.  * DirectDraw supports arbitrary stretching of a surface along the
  1434.  * x axis (horizontal direction) for overlays.
  1435.  */
  1436. #define DDFXCAPS_OVERLAYSTRETCHX        0x00800000l
  1437.  
  1438. /*
  1439.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  1440.  * along the x axis (horizontal direction) for overlays.
  1441.  */
  1442. #define DDFXCAPS_OVERLAYSTRETCHXN       0x01000000l
  1443.  
  1444. /*
  1445.  * DirectDraw supports arbitrary stretching of a surface along the
  1446.  * y axis (horizontal direction) for overlays.  
  1447.  */
  1448. #define DDFXCAPS_OVERLAYSTRETCHY        0x02000000l
  1449.  
  1450. /*
  1451.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  1452.  * along the y axis (vertical direction) for overlays.  
  1453.  */
  1454. #define DDFXCAPS_OVERLAYSTRETCHYN       0x04000000l
  1455.  
  1456. /*
  1457.  * DirectDraw supports mirroring of overlays across the vertical axis
  1458.  */
  1459. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
  1460.  
  1461. /*
  1462.  * DirectDraw supports mirroring of overlays across the horizontal axis
  1463.  */
  1464. #define DDFXCAPS_OVERLAYMIRRORUPDOWN    0x10000000l
  1465.  
  1466. /****************************************************************************
  1467.  *
  1468.  * DIRECTDRAW STEREO VIEW CAPABILITIES
  1469.  *
  1470.  ****************************************************************************/
  1471.  
  1472. /*
  1473.  * The stereo view is accomplished via enigma encoding.
  1474.  */
  1475. #define DDSVCAPS_ENIGMA                 0x00000001l
  1476.  
  1477. /*
  1478.  * The stereo view is accomplished via high frequency flickering.
  1479.  */
  1480. #define DDSVCAPS_FLICKER                0x00000002l
  1481.  
  1482. /*
  1483.  * The stereo view is accomplished via red and blue filters applied
  1484.  * to the left and right eyes.  All images must adapt their colorspaces
  1485.  * for this process.
  1486.  */
  1487. #define DDSVCAPS_REDBLUE                0x00000004l
  1488.  
  1489. /*
  1490.  * The stereo view is accomplished with split screen technology.
  1491.  */
  1492. #define DDSVCAPS_SPLIT                  0x00000008l
  1493.  
  1494. /****************************************************************************
  1495.  *
  1496.  * DIRECTDRAWPALETTE CAPABILITIES
  1497.  *
  1498.  ****************************************************************************/
  1499.  
  1500. /*
  1501.  * Index is 4 bits.  There are sixteen color entries in the palette table.
  1502.  */
  1503. #define DDPCAPS_4BIT                    0x00000001l
  1504.  
  1505. /*
  1506.  * Index is onto a 8 bit color index.  This field is only valid with the
  1507.  * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
  1508.  * surface is in 8bpp. Each color entry is one byte long and is an index
  1509.  * into destination surface's 8bpp palette.
  1510.  */
  1511. #define DDPCAPS_8BITENTRIES             0x00000002l
  1512.  
  1513. /*
  1514.  * Index is 8 bits.  There are 256 color entries in the palette table.
  1515.  */
  1516. #define DDPCAPS_8BIT                    0x00000004l
  1517.  
  1518. /*
  1519.  * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  1520.  * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  1521.  * object.
  1522.  */
  1523. #define DDPCAPS_INITIALIZE              0x00000008l
  1524.  
  1525. /*
  1526.  * This palette is the one attached to the primary surface.  Changing this
  1527.  * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  1528.  * and supported.
  1529.  */
  1530. #define DDPCAPS_PRIMARYSURFACE          0x00000010l
  1531.  
  1532. /*
  1533.  * This palette is the one attached to the primary surface left.  Changing
  1534.  * this table has immediate effect on the display for the left eye unless
  1535.  * DDPSETPAL_VSYNC is specified and supported.
  1536.  */
  1537. #define DDPCAPS_PRIMARYSURFACELEFT      0x00000020l
  1538.  
  1539. /*
  1540.  * This palette can have all 256 entries defined
  1541.  */
  1542. #define DDPCAPS_ALLOW256                0x00000040l
  1543.  
  1544. /*
  1545.  * This palette can have modifications to it synced with the monitors
  1546.  * refresh rate.
  1547.  */
  1548. #define DDPCAPS_VSYNC                   0x00000080l
  1549.  
  1550. /*
  1551.  * Index is 1 bit.  There are two color entries in the palette table.
  1552.  */
  1553. #define DDPCAPS_1BIT                    0x00000100l
  1554.  
  1555. /*
  1556.  * Index is 2 bit.  There are four color entries in the palette table.
  1557.  */
  1558. #define DDPCAPS_2BIT                    0x00000200l
  1559.  
  1560.  
  1561. /****************************************************************************
  1562.  *
  1563.  * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  1564.  *
  1565.  ****************************************************************************/
  1566.  
  1567.  
  1568. /****************************************************************************
  1569.  *
  1570.  * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  1571.  *
  1572.  ****************************************************************************/
  1573.  
  1574. /* 0 is the only legal value */
  1575.  
  1576. /****************************************************************************
  1577.  *
  1578.  * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  1579.  *
  1580.  ****************************************************************************/
  1581.  
  1582.  
  1583. /****************************************************************************
  1584.  *
  1585.  * DIRECTDRAW BITDEPTH CONSTANTS
  1586.  *
  1587.  * NOTE:  These are only used to indicate supported bit depths.   These
  1588.  * are flags only, they are not to be used as an actual bit depth.   The
  1589.  * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  1590.  * bit depths in a surface or for changing the display mode.
  1591.  *
  1592.  ****************************************************************************/
  1593.  
  1594. /*
  1595.  * 1 bit per pixel.
  1596.  */
  1597. #define DDBD_1                  0x00004000l
  1598.  
  1599. /*
  1600.  * 2 bits per pixel.
  1601.  */
  1602. #define DDBD_2                  0x00002000l
  1603.  
  1604. /*
  1605.  * 4 bits per pixel.
  1606.  */
  1607. #define DDBD_4                  0x00001000l
  1608.  
  1609. /*
  1610.  * 8 bits per pixel.
  1611.  */
  1612. #define DDBD_8                  0x00000800l
  1613.  
  1614. /*
  1615.  * 16 bits per pixel.
  1616.  */
  1617. #define DDBD_16                 0x00000400l
  1618.  
  1619. /*
  1620.  * 24 bits per pixel.
  1621.  */
  1622. #define DDBD_24                 0X00000200l
  1623.  
  1624. /*
  1625.  * 32 bits per pixel.
  1626.  */
  1627. #define DDBD_32                 0x00000100l
  1628.  
  1629. /****************************************************************************
  1630.  *
  1631.  * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  1632.  *
  1633.  ****************************************************************************/
  1634.  
  1635. /*
  1636.  * Set if the structure contains a color space.  Not set if the structure
  1637.  * contains a single color key.
  1638.  */
  1639. #define DDCKEY_COLORSPACE       0x00000001l
  1640.  
  1641. /*
  1642.  * Set if the structure specifies a color key or color space which is to be
  1643.  * used as a destination color key for blt operations.
  1644.  */
  1645. #define DDCKEY_DESTBLT          0x00000002l
  1646.  
  1647. /*
  1648.  * Set if the structure specifies a color key or color space which is to be
  1649.  * used as a destination color key for overlay operations.
  1650.  */
  1651. #define DDCKEY_DESTOVERLAY      0x00000004l
  1652.  
  1653. /*
  1654.  * Set if the structure specifies a color key or color space which is to be
  1655.  * used as a source color key for blt operations.
  1656.  */
  1657. #define DDCKEY_SRCBLT           0x00000008l
  1658.  
  1659. /*
  1660.  * Set if the structure specifies a color key or color space which is to be
  1661.  * used as a source color key for overlay operations.
  1662.  */
  1663. #define DDCKEY_SRCOVERLAY       0x00000010l
  1664.  
  1665.  
  1666. /****************************************************************************
  1667.  *
  1668.  * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  1669.  *
  1670.  ****************************************************************************/
  1671.  
  1672. /*
  1673.  * Supports transparent blting using a color key to identify the replaceable 
  1674.  * bits of the destination surface for RGB colors.
  1675.  */
  1676. #define DDCKEYCAPS_DESTBLT                      0x00000001l
  1677.  
  1678. /*
  1679.  * Supports transparent blting using a color space to identify the replaceable
  1680.  * bits of the destination surface for RGB colors.
  1681.  */
  1682. #define DDCKEYCAPS_DESTBLTCLRSPACE              0x00000002l
  1683.  
  1684. /*
  1685.  * Supports transparent blting using a color space to identify the replaceable
  1686.  * bits of the destination surface for YUV colors.
  1687.  */
  1688. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV           0x00000004l
  1689.  
  1690. /*
  1691.  * Supports transparent blting using a color key to identify the replaceable 
  1692.  * bits of the destination surface for YUV colors.
  1693.  */
  1694. #define DDCKEYCAPS_DESTBLTYUV                   0x00000008l
  1695.  
  1696. /*
  1697.  * Supports overlaying using colorkeying of the replaceable bits of the surface
  1698.  * being overlayed for RGB colors.
  1699.  */
  1700. #define DDCKEYCAPS_DESTOVERLAY                  0x00000010l
  1701.  
  1702. /*
  1703.  * Supports a color space as the color key for the destination for RGB colors.
  1704.  */
  1705. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE          0x00000020l
  1706.  
  1707. /*
  1708.  * Supports a color space as the color key for the destination for YUV colors.
  1709.  */
  1710. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV       0x00000040l
  1711.  
  1712. /*
  1713.  * Supports only one active destination color key value for visible overlay
  1714.  * surfaces.
  1715.  */
  1716. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE         0x00000080l
  1717.  
  1718. /*
  1719.  * Supports overlaying using colorkeying of the replaceable bits of the 
  1720.  * surface being overlayed for YUV colors.
  1721.  */
  1722. #define DDCKEYCAPS_DESTOVERLAYYUV               0x00000100l
  1723.  
  1724. /*
  1725.  * Supports transparent blting using the color key for the source with
  1726.  * this surface for RGB colors.
  1727.  */
  1728. #define DDCKEYCAPS_SRCBLT                       0x00000200l
  1729.  
  1730. /*
  1731.  * Supports transparent blting using a color space for the source with
  1732.  * this surface for RGB colors.
  1733.  */
  1734. #define DDCKEYCAPS_SRCBLTCLRSPACE               0x00000400l
  1735.  
  1736. /*
  1737.  * Supports transparent blting using a color space for the source with
  1738.  * this surface for YUV colors.
  1739.  */
  1740. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV            0x00000800l
  1741.  
  1742. /*
  1743.  * Supports transparent blting using the color key for the source with
  1744.  * this surface for YUV colors.
  1745.  */
  1746. #define DDCKEYCAPS_SRCBLTYUV                    0x00001000l
  1747.  
  1748. /*
  1749.  * Supports overlays using the color key for the source with this
  1750.  * overlay surface for RGB colors.
  1751.  */
  1752. #define DDCKEYCAPS_SRCOVERLAY                   0x00002000l
  1753.  
  1754. /*
  1755.  * Supports overlays using a color space as the source color key for
  1756.  * the overlay surface for RGB colors.
  1757.  */
  1758. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE           0x00004000l
  1759.  
  1760. /*
  1761.  * Supports overlays using a color space as the source color key for
  1762.  * the overlay surface for YUV colors.
  1763.  */
  1764. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV        0x00008000l
  1765.  
  1766. /*
  1767.  * Supports only one active source color key value for visible
  1768.  * overlay surfaces.
  1769.  */
  1770. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE          0x00010000l
  1771.  
  1772. /*
  1773.  * Supports overlays using the color key for the source with this
  1774.  * overlay surface for YUV colors.
  1775.  */
  1776. #define DDCKEYCAPS_SRCOVERLAYYUV                0x00020000l
  1777.  
  1778. /*
  1779.  * there are no bandwidth trade-offs for using colorkey with an overlay
  1780.  */
  1781. #define DDCKEYCAPS_NOCOSTOVERLAY                0x00040000l
  1782.  
  1783.  
  1784. /****************************************************************************
  1785.  *
  1786.  * DIRECTDRAW PIXELFORMAT FLAGS
  1787.  *
  1788.  ****************************************************************************/
  1789.  
  1790. /*
  1791.  * The surface has alpha channel information in the pixel format.
  1792.  */
  1793. #define DDPF_ALPHAPIXELS                        0x00000001l
  1794.  
  1795. /*
  1796.  * The pixel format contains alpha only information
  1797.  */
  1798. #define DDPF_ALPHA                              0x00000002l
  1799.  
  1800. /*
  1801.  * The FourCC code is valid.
  1802.  */
  1803. #define DDPF_FOURCC                             0x00000004l
  1804.  
  1805. /*
  1806.  * The surface is 4-bit color indexed.
  1807.  */
  1808. #define DDPF_PALETTEINDEXED4                    0x00000008l
  1809.  
  1810. /*
  1811.  * The surface is indexed into a palette which stores indices
  1812.  * into the destination surface's 8-bit palette.
  1813.  */
  1814. #define DDPF_PALETTEINDEXEDTO8                  0x00000010l
  1815.  
  1816. /*
  1817.  * The surface is 8-bit color indexed.
  1818.  */
  1819. #define DDPF_PALETTEINDEXED8                    0x00000020l
  1820.  
  1821. /*
  1822.  * The RGB data in the pixel format structure is valid.
  1823.  */
  1824. #define DDPF_RGB                                0x00000040l
  1825.  
  1826. /*
  1827.  * The surface will accept pixel data in the format specified
  1828.  * and compress it during the write.
  1829.  */
  1830. #define DDPF_COMPRESSED                         0x00000080l
  1831.  
  1832. /*
  1833.  * The surface will accept RGB data and translate it during
  1834.  * the write to YUV data.  The format of the data to be written
  1835.  * will be contained in the pixel format structure.  The DDPF_RGB
  1836.  * flag will be set. 
  1837.  */
  1838. #define DDPF_RGBTOYUV                           0x00000100l
  1839.  
  1840. /*
  1841.  * pixel format is YUV - YUV data in pixel format struct is valid
  1842.  */
  1843. #define DDPF_YUV                                0x00000200l
  1844.  
  1845. /*
  1846.  * pixel format is a z buffer only surface
  1847.  */
  1848. #define DDPF_ZBUFFER                            0x00000400l
  1849.  
  1850. /*
  1851.  * The surface is 1-bit color indexed.
  1852.  */
  1853. #define DDPF_PALETTEINDEXED1                    0x00000800l
  1854.  
  1855. /*
  1856.  * The surface is 2-bit color indexed.
  1857.  */
  1858. #define DDPF_PALETTEINDEXED2                    0x00001000l
  1859.  
  1860. /*===========================================================================
  1861.  *
  1862.  *
  1863.  * DIRECTDRAW CALLBACK FLAGS
  1864.  *
  1865.  *
  1866.  *==========================================================================*/
  1867.  
  1868. /****************************************************************************
  1869.  *
  1870.  * DIRECTDRAW ENUMSURFACES FLAGS
  1871.  *
  1872.  ****************************************************************************/
  1873.  
  1874. /*
  1875.  * Enumerate all of the surfaces that meet the search criterion.
  1876.  */
  1877. #define DDENUMSURFACES_ALL                      0x00000001l
  1878.  
  1879. /*
  1880.  * A search hit is a surface that matches the surface description.
  1881.  */
  1882. #define DDENUMSURFACES_MATCH                    0x00000002l
  1883.  
  1884. /*
  1885.  * A search hit is a surface that does not match the surface description.
  1886.  */
  1887. #define DDENUMSURFACES_NOMATCH                  0x00000004l
  1888.  
  1889. /*
  1890.  * Enumerate the first surface that can be created which meets the search criterion.
  1891.  */
  1892. #define DDENUMSURFACES_CANBECREATED             0x00000008l
  1893.  
  1894. /*
  1895.  * Enumerate the surfaces that already exist that meet the search criterion.
  1896.  */
  1897. #define DDENUMSURFACES_DOESEXIST                0x00000010l
  1898.  
  1899.  
  1900. /****************************************************************************
  1901.  *
  1902.  * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  1903.  *
  1904.  ****************************************************************************/
  1905.  
  1906. /*
  1907.  * Enumerate Modes with different refresh rates.  EnumDisplayModes guarantees
  1908.  * that a particular mode will be enumerated only once.  This flag specifies whether
  1909.  * the refresh rate is taken into account when determining if a mode is unique.
  1910.  */
  1911. #define DDEDM_REFRESHRATES                      0x00000001l
  1912.  
  1913.  
  1914. /****************************************************************************
  1915.  *
  1916.  * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  1917.  *
  1918.  ****************************************************************************/
  1919.  
  1920. /*
  1921.  * Exclusive mode owner will be responsible for the entire primary surface.
  1922.  * GDI can be ignored. used with DD
  1923.  */
  1924. #define DDSCL_FULLSCREEN                        0x00000001l
  1925.  
  1926. /*
  1927.  * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode 
  1928.  */
  1929. #define DDSCL_ALLOWREBOOT                       0x00000002l
  1930.  
  1931. /*
  1932.  * prevents DDRAW from modifying the application window.
  1933.  * prevents DDRAW from minimize/restore the application window on activation.
  1934.  */
  1935. #define DDSCL_NOWINDOWCHANGES                   0x00000004l
  1936.  
  1937. /*
  1938.  * app wants to work as a regular Windows application
  1939.  */
  1940. #define DDSCL_NORMAL                            0x00000008l
  1941.  
  1942. /*
  1943.  * app wants exclusive access
  1944.  */
  1945. #define DDSCL_EXCLUSIVE                         0x00000010l
  1946.  
  1947.  
  1948. /*
  1949.  * app can deal with non-windows display modes
  1950.  */
  1951. #define DDSCL_ALLOWMODEX                        0x00000040l
  1952.  
  1953.  
  1954. /****************************************************************************
  1955.  *
  1956.  * DIRECTDRAW BLT FLAGS
  1957.  *
  1958.  ****************************************************************************/
  1959.  
  1960. /*
  1961.  * Use the alpha information in the pixel format or the alpha channel surface
  1962.  * attached to the destination surface as the alpha channel for this blt.
  1963.  */
  1964. #define DDBLT_ALPHADEST                         0x00000001l
  1965.  
  1966. /*
  1967.  * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  1968.  * for the destination surface for this blt.
  1969.  */
  1970. #define DDBLT_ALPHADESTCONSTOVERRIDE            0x00000002l
  1971.  
  1972. /*
  1973.  * The NEG suffix indicates that the destination surface becomes more
  1974.  * transparent as the alpha value increases. (0 is opaque)
  1975.  */
  1976. #define DDBLT_ALPHADESTNEG                      0x00000004l
  1977.  
  1978. /*
  1979.  * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  1980.  * channel for the destination for this blt.
  1981.  */
  1982. #define DDBLT_ALPHADESTSURFACEOVERRIDE          0x00000008l
  1983.  
  1984. /*
  1985.  * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  1986.  * for the edges of the image that border the color key colors.
  1987.  */
  1988. #define DDBLT_ALPHAEDGEBLEND                    0x00000010l
  1989.  
  1990. /*
  1991.  * Use the alpha information in the pixel format or the alpha channel surface
  1992.  * attached to the source surface as the alpha channel for this blt.
  1993.  */
  1994. #define DDBLT_ALPHASRC                          0x00000020l
  1995.  
  1996. /*
  1997.  * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  1998.  * for the source for this blt.
  1999.  */
  2000. #define DDBLT_ALPHASRCCONSTOVERRIDE             0x00000040l
  2001.  
  2002. /*
  2003.  * The NEG suffix indicates that the source surface becomes more transparent
  2004.  * as the alpha value increases. (0 is opaque)
  2005.  */
  2006. #define DDBLT_ALPHASRCNEG                       0x00000080l
  2007.  
  2008. /*
  2009.  * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  2010.  * for the source for this blt. 
  2011.  */
  2012. #define DDBLT_ALPHASRCSURFACEOVERRIDE           0x00000100l
  2013.  
  2014. /*
  2015.  * Do this blt asynchronously through the FIFO in the order received.  If
  2016.  * there is no room in the hardware FIFO fail the call.
  2017.  */
  2018. #define DDBLT_ASYNC                             0x00000200l
  2019.  
  2020. /*
  2021.  * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  2022.  * to fill the destination rectangle on the destination surface with.
  2023.  */
  2024. #define DDBLT_COLORFILL                         0x00000400l
  2025.  
  2026. /*
  2027.  * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  2028.  * to use for the blt.
  2029.  */
  2030. #define DDBLT_DDFX                              0x00000800l
  2031.  
  2032. /*
  2033.  * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  2034.  * that are not part of the Win32 API.
  2035.  */
  2036. #define DDBLT_DDROPS                            0x00001000l
  2037.  
  2038. /*
  2039.  * Use the color key associated with the destination surface.
  2040.  */
  2041. #define DDBLT_KEYDEST                           0x00002000l
  2042.  
  2043. /*
  2044.  * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  2045.  * for the destination surface.
  2046.  */
  2047. #define DDBLT_KEYDESTOVERRIDE                   0x00004000l
  2048.  
  2049. /*
  2050.  * Use the color key associated with the source surface.
  2051.  */
  2052. #define DDBLT_KEYSRC                            0x00008000l
  2053.  
  2054. /*
  2055.  * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  2056.  * for the source surface.
  2057.  */
  2058. #define DDBLT_KEYSRCOVERRIDE                    0x00010000l
  2059.  
  2060. /*
  2061.  * Use the dwROP field in the DDBLTFX structure for the raster operation
  2062.  * for this blt.  These ROPs are the same as the ones defined in the Win32 API.
  2063.  */
  2064. #define DDBLT_ROP                               0x00020000l
  2065.  
  2066. /*
  2067.  * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  2068.  * (specified in 1/100th of a degree) to rotate the surface.
  2069.  */
  2070. #define DDBLT_ROTATIONANGLE                     0x00040000l
  2071.  
  2072. /*
  2073.  * Z-buffered blt using the z-buffers attached to the source and destination
  2074.  * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  2075.  * z-buffer opcode.
  2076.  */
  2077. #define DDBLT_ZBUFFER                           0x00080000l
  2078.  
  2079. /*
  2080.  * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  2081.  * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  2082.  * for the destination.
  2083.  */
  2084. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE          0x00100000l
  2085.  
  2086. /*
  2087.  * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  2088.  * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  2089.  * respectively for the destination.
  2090.  */
  2091. #define DDBLT_ZBUFFERDESTOVERRIDE               0x00200000l
  2092.  
  2093. /*
  2094.  * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  2095.  * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  2096.  * for the source.
  2097.  */
  2098. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE           0x00400000l
  2099.  
  2100. /*
  2101.  * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  2102.  * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  2103.  * respectively for the source.
  2104.  */
  2105. #define DDBLT_ZBUFFERSRCOVERRIDE                0x00800000l
  2106.  
  2107. /*
  2108.  * wait until the device is ready to handle the blt
  2109.  * this will cause blt to not return DDERR_WASSTILLDRAWING
  2110.  */
  2111. #define DDBLT_WAIT                              0x01000000l
  2112.  
  2113. /*
  2114.  * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
  2115.  * to fill the destination rectangle on the destination Z-buffer surface
  2116.  * with.
  2117.  */
  2118. #define DDBLT_DEPTHFILL                         0x02000000l
  2119.  
  2120.  
  2121. /****************************************************************************
  2122.  *
  2123.  * BLTFAST FLAGS
  2124.  *
  2125.  ****************************************************************************/
  2126.  
  2127. #define DDBLTFAST_NOCOLORKEY                    0x00000000
  2128. #define DDBLTFAST_SRCCOLORKEY                   0x00000001
  2129. #define DDBLTFAST_DESTCOLORKEY                  0x00000002
  2130. #define DDBLTFAST_WAIT                          0x00000010
  2131.  
  2132. /****************************************************************************
  2133.  *
  2134.  * FLIP FLAGS
  2135.  *
  2136.  ****************************************************************************/
  2137.  
  2138. #define DDFLIP_WAIT                          0x00000001l
  2139.  
  2140.  
  2141. /****************************************************************************
  2142.  *
  2143.  * DIRECTDRAW SURFACE OVERLAY FLAGS
  2144.  *
  2145.  ****************************************************************************/
  2146.  
  2147. /*
  2148.  * Use the alpha information in the pixel format or the alpha channel surface
  2149.  * attached to the destination surface as the alpha channel for the
  2150.  * destination overlay.
  2151.  */
  2152. #define DDOVER_ALPHADEST                        0x00000001l
  2153.  
  2154. /*
  2155.  * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  2156.  * destination alpha channel for this overlay.
  2157.  */
  2158. #define DDOVER_ALPHADESTCONSTOVERRIDE           0x00000002l
  2159.  
  2160. /*
  2161.  * The NEG suffix indicates that the destination surface becomes more
  2162.  * transparent as the alpha value increases. 
  2163.  */
  2164. #define DDOVER_ALPHADESTNEG                     0x00000004l
  2165.  
  2166. /*
  2167.  * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  2168.  * channel destination for this overlay.
  2169.  */
  2170. #define DDOVER_ALPHADESTSURFACEOVERRIDE         0x00000008l
  2171.  
  2172. /*
  2173.  * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  2174.  * channel for the edges of the image that border the color key colors.
  2175.  */
  2176. #define DDOVER_ALPHAEDGEBLEND                   0x00000010l
  2177.  
  2178. /*
  2179.  * Use the alpha information in the pixel format or the alpha channel surface
  2180.  * attached to the source surface as the source alpha channel for this overlay.
  2181.  */
  2182. #define DDOVER_ALPHASRC                         0x00000020l
  2183.  
  2184. /*
  2185.  * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  2186.  * alpha channel for this overlay.
  2187.  */
  2188. #define DDOVER_ALPHASRCCONSTOVERRIDE            0x00000040l
  2189.  
  2190. /*
  2191.  * The NEG suffix indicates that the source surface becomes more transparent
  2192.  * as the alpha value increases.
  2193.  */
  2194. #define DDOVER_ALPHASRCNEG                      0x00000080l
  2195.  
  2196. /*
  2197.  * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  2198.  * source for this overlay.
  2199.  */
  2200. #define DDOVER_ALPHASRCSURFACEOVERRIDE          0x00000100l
  2201.  
  2202. /*
  2203.  * Turn this overlay off.
  2204.  */
  2205. #define DDOVER_HIDE                             0x00000200l
  2206.  
  2207. /*
  2208.  * Use the color key associated with the destination surface.
  2209.  */
  2210. #define DDOVER_KEYDEST                          0x00000400l
  2211.  
  2212. /*
  2213.  * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  2214.  * for the destination surface
  2215.  */
  2216. #define DDOVER_KEYDESTOVERRIDE                  0x00000800l
  2217.  
  2218. /*
  2219.  * Use the color key associated with the source surface.
  2220.  */
  2221. #define DDOVER_KEYSRC                           0x00001000l
  2222.  
  2223. /*
  2224.  * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  2225.  * for the source surface.
  2226.  */
  2227. #define DDOVER_KEYSRCOVERRIDE                   0x00002000l
  2228.  
  2229. /*
  2230.  * Turn this overlay on.
  2231.  */
  2232. #define DDOVER_SHOW                             0x00004000l
  2233.  
  2234. /*
  2235.  * Add a dirty rect to an emulated overlayed surface.
  2236.  */
  2237. #define DDOVER_ADDDIRTYRECT                     0x00008000l
  2238.  
  2239. /*
  2240.  * Redraw all dirty rects on an emulated overlayed surface.
  2241.  */
  2242. #define DDOVER_REFRESHDIRTYRECTS                0x00010000l
  2243.  
  2244. /*
  2245.  * Redraw the entire surface on an emulated overlayed surface.
  2246.  */
  2247. #define DDOVER_REFRESHALL                      0x00020000l
  2248.  
  2249.  
  2250. /*
  2251.  * Use the overlay FX flags to define special overlay FX
  2252.  */
  2253. #define DDOVER_DDFX                             0x00080000l
  2254.  
  2255.  
  2256. /****************************************************************************
  2257.  *
  2258.  * DIRECTDRAWSURFACE LOCK FLAGS
  2259.  *
  2260.  ****************************************************************************/
  2261.  
  2262. /*
  2263.  * The default.  Set to indicate that Lock should return a valid memory pointer
  2264.  * to the top of the specified rectangle.  If no rectangle is specified then a
  2265.  * pointer to the top of the surface is returned.
  2266.  */
  2267. #define DDLOCK_SURFACEMEMORYPTR                 0x00000000L     // default
  2268.  
  2269. /*
  2270.  * Set to indicate that Lock should wait until it can obtain a valid memory
  2271.  * pointer before returning.  If this bit is set, Lock will never return 
  2272.  * DDERR_WASSTILLDRAWING.
  2273.  */
  2274. #define DDLOCK_WAIT                             0x00000001L
  2275.  
  2276. /*
  2277.  * Set if an event handle is being passed to Lock.  Lock will trigger the event
  2278.  * when it can return the surface memory pointer requested.
  2279.  */
  2280. #define DDLOCK_EVENT                            0x00000002L
  2281.  
  2282. /*
  2283.  * Indicates that the surface being locked will only be read from.
  2284.  */
  2285. #define DDLOCK_READONLY                         0x00000010L
  2286.  
  2287. /*
  2288.  * Indicates that the surface being locked will only be written to
  2289.  */
  2290. #define DDLOCK_WRITEONLY                        0x00000020L
  2291.  
  2292.  
  2293. /****************************************************************************
  2294.  *
  2295.  * DIRECTDRAWSURFACE PAGELOCK FLAGS
  2296.  *
  2297.  ****************************************************************************/
  2298.  
  2299. /*
  2300.  * No flags defined at present
  2301.  */
  2302.  
  2303.  
  2304. /****************************************************************************
  2305.  *
  2306.  * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
  2307.  *
  2308.  ****************************************************************************/
  2309.  
  2310. /*
  2311.  * No flags defined at present
  2312.  */
  2313.  
  2314.  
  2315. /****************************************************************************
  2316.  *
  2317.  * DIRECTDRAWSURFACE BLT FX FLAGS
  2318.  *
  2319.  ****************************************************************************/
  2320.  
  2321. /*
  2322.  * If stretching, use arithmetic stretching along the Y axis for this blt.
  2323.  */
  2324. #define DDBLTFX_ARITHSTRETCHY                   0x00000001l
  2325.  
  2326. /*
  2327.  * Do this blt mirroring the surface left to right.  Spin the
  2328.  * surface around its y-axis.
  2329.  */
  2330. #define DDBLTFX_MIRRORLEFTRIGHT                 0x00000002l
  2331.  
  2332. /*
  2333.  * Do this blt mirroring the surface up and down.  Spin the surface
  2334.  * around its x-axis.
  2335.  */
  2336. #define DDBLTFX_MIRRORUPDOWN                    0x00000004l
  2337.  
  2338. /*
  2339.  * Schedule this blt to avoid tearing.
  2340.  */
  2341. #define DDBLTFX_NOTEARING                       0x00000008l
  2342.  
  2343. /*
  2344.  * Do this blt rotating the surface one hundred and eighty degrees.
  2345.  */
  2346. #define DDBLTFX_ROTATE180                       0x00000010l
  2347.  
  2348. /*
  2349.  * Do this blt rotating the surface two hundred and seventy degrees.
  2350.  */
  2351. #define DDBLTFX_ROTATE270                       0x00000020l
  2352.  
  2353. /*
  2354.  * Do this blt rotating the surface ninety degrees.
  2355.  */
  2356. #define DDBLTFX_ROTATE90                        0x00000040l
  2357.  
  2358. /*
  2359.  * Do this z blt using dwZBufferLow and dwZBufferHigh as  range values
  2360.  * specified to limit the bits copied from the source surface.
  2361.  */
  2362. #define DDBLTFX_ZBUFFERRANGE                    0x00000080l
  2363.  
  2364. /*
  2365.  * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  2366.  * before comparing it with the desting z values.
  2367.  */
  2368. #define DDBLTFX_ZBUFFERBASEDEST                 0x00000100l
  2369.  
  2370. /****************************************************************************
  2371.  *
  2372.  * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  2373.  *
  2374.  ****************************************************************************/
  2375.  
  2376. /*
  2377.  * If stretching, use arithmetic stretching along the Y axis for this overlay.
  2378.  */
  2379. #define DDOVERFX_ARITHSTRETCHY                  0x00000001l
  2380.  
  2381. /*
  2382.  * Mirror the overlay across the vertical axis
  2383.  */
  2384. #define DDOVERFX_MIRRORLEFTRIGHT                0x00000002l
  2385.  
  2386. /*
  2387.  * Mirror the overlay across the horizontal axis
  2388.  */
  2389. #define DDOVERFX_MIRRORUPDOWN                   0x00000004l
  2390.  
  2391. /****************************************************************************
  2392.  *
  2393.  * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  2394.  *
  2395.  ****************************************************************************/
  2396.  
  2397. /*
  2398.  * return when the vertical blank interval begins
  2399.  */
  2400. #define DDWAITVB_BLOCKBEGIN                     0x00000001l
  2401.  
  2402. /*
  2403.  * set up an event to trigger when the vertical blank begins
  2404.  */
  2405. #define DDWAITVB_BLOCKBEGINEVENT                0x00000002l
  2406.  
  2407. /*
  2408.  * return when the vertical blank interval ends and display begins
  2409.  */
  2410. #define DDWAITVB_BLOCKEND                       0x00000004l
  2411.  
  2412. /****************************************************************************
  2413.  *
  2414.  * DIRECTDRAW GETFLIPSTATUS FLAGS
  2415.  *
  2416.  ****************************************************************************/
  2417.  
  2418. /*
  2419.  * is it OK to flip now?
  2420.  */
  2421. #define DDGFS_CANFLIP                   0x00000001l
  2422.  
  2423. /*
  2424.  * is the last flip finished?
  2425.  */
  2426. #define DDGFS_ISFLIPDONE                0x00000002l
  2427.  
  2428. /****************************************************************************
  2429.  *
  2430.  * DIRECTDRAW GETBLTSTATUS FLAGS
  2431.  *
  2432.  ****************************************************************************/
  2433.  
  2434. /*
  2435.  * is it OK to blt now?
  2436.  */
  2437. #define DDGBS_CANBLT                    0x00000001l
  2438.  
  2439. /*
  2440.  * is the blt to the surface finished?
  2441.  */
  2442. #define DDGBS_ISBLTDONE                 0x00000002l
  2443.  
  2444.  
  2445. /****************************************************************************
  2446.  *
  2447.  * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  2448.  *
  2449.  ****************************************************************************/
  2450.  
  2451. /*
  2452.  * Enumerate overlays back to front.
  2453.  */
  2454. #define DDENUMOVERLAYZ_BACKTOFRONT      0x00000000l
  2455.  
  2456. /*
  2457.  * Enumerate overlays front to back
  2458.  */
  2459. #define DDENUMOVERLAYZ_FRONTTOBACK      0x00000001l
  2460.  
  2461. /****************************************************************************
  2462.  *
  2463.  * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  2464.  *
  2465.  ****************************************************************************/
  2466.  
  2467. /*
  2468.  * Send overlay to front
  2469.  */
  2470. #define DDOVERZ_SENDTOFRONT             0x00000000l
  2471.  
  2472. /*
  2473.  * Send overlay to back
  2474.  */
  2475. #define DDOVERZ_SENDTOBACK              0x00000001l
  2476.  
  2477. /*
  2478.  * Move Overlay forward
  2479.  */
  2480. #define DDOVERZ_MOVEFORWARD             0x00000002l
  2481.  
  2482. /*
  2483.  * Move Overlay backward
  2484.  */
  2485. #define DDOVERZ_MOVEBACKWARD            0x00000003l
  2486.  
  2487. /*
  2488.  * Move Overlay in front of relative surface
  2489.  */
  2490. #define DDOVERZ_INSERTINFRONTOF         0x00000004l
  2491.  
  2492. /*
  2493.  * Move Overlay in back of relative surface
  2494.  */
  2495. #define DDOVERZ_INSERTINBACKOF          0x00000005l
  2496.  
  2497. /*===========================================================================
  2498.  *
  2499.  *
  2500.  * DIRECTDRAW RETURN CODES
  2501.  *
  2502.  * The return values from DirectDraw Commands and Surface that return an HRESULT
  2503.  * are codes from DirectDraw concerning the results of the action
  2504.  * requested by DirectDraw.
  2505.  *
  2506.  *==========================================================================*/
  2507.  
  2508. /*
  2509.  * Status is OK
  2510.  *
  2511.  * Issued by: DirectDraw Commands and all callbacks
  2512.  */
  2513. #define DD_OK                                   0
  2514.  
  2515. /****************************************************************************
  2516.  *
  2517.  * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  2518.  *
  2519.  * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  2520.  * DIRECTDRAWSURFACE object enumerations.   They can only be returned by
  2521.  * enumeration callback routines.
  2522.  *
  2523.  ****************************************************************************/
  2524.  
  2525. /*
  2526.  * stop the enumeration
  2527.  */
  2528. #define DDENUMRET_CANCEL                        0
  2529.  
  2530. /*
  2531.  * continue the enumeration
  2532.  */
  2533. #define DDENUMRET_OK                            1
  2534.  
  2535. /****************************************************************************
  2536.  *
  2537.  * DIRECTDRAW ERRORS
  2538.  *
  2539.  * Errors are represented by negative values and cannot be combined.
  2540.  *
  2541.  ****************************************************************************/
  2542.  
  2543. /*
  2544.  * This object is already initialized
  2545.  */
  2546. #define DDERR_ALREADYINITIALIZED                MAKE_DDHRESULT( 5 )
  2547.  
  2548. /*
  2549.  * This surface can not be attached to the requested surface.
  2550.  */
  2551. #define DDERR_CANNOTATTACHSURFACE               MAKE_DDHRESULT( 10 )
  2552.  
  2553. /*
  2554.  * This surface can not be detached from the requested surface.
  2555.  */
  2556. #define DDERR_CANNOTDETACHSURFACE               MAKE_DDHRESULT( 20 )
  2557.  
  2558. /*
  2559.  * Support is currently not available.
  2560.  */
  2561. #define DDERR_CURRENTLYNOTAVAIL                 MAKE_DDHRESULT( 40 )
  2562.  
  2563. /*
  2564.  * An exception was encountered while performing the requested operation
  2565.  */
  2566. #define DDERR_EXCEPTION                         MAKE_DDHRESULT( 55 )
  2567.  
  2568. /*
  2569.  * Generic failure.
  2570.  */
  2571. #define DDERR_GENERIC                           E_FAIL
  2572.  
  2573. /*
  2574.  * Height of rectangle provided is not a multiple of reqd alignment
  2575.  */
  2576. #define DDERR_HEIGHTALIGN                       MAKE_DDHRESULT( 90 )
  2577.  
  2578. /*
  2579.  * Unable to match primary surface creation request with existing 
  2580.  * primary surface.
  2581.  */
  2582. #define DDERR_INCOMPATIBLEPRIMARY               MAKE_DDHRESULT( 95 )
  2583.  
  2584. /*
  2585.  * One or more of the caps bits passed to the callback are incorrect.
  2586.  */
  2587. #define DDERR_INVALIDCAPS                       MAKE_DDHRESULT( 100 )
  2588.  
  2589. /*
  2590.  * DirectDraw does not support provided Cliplist.
  2591.  */
  2592. #define DDERR_INVALIDCLIPLIST                   MAKE_DDHRESULT( 110 )
  2593.  
  2594. /*
  2595.  * DirectDraw does not support the requested mode
  2596.  */
  2597. #define DDERR_INVALIDMODE                       MAKE_DDHRESULT( 120 )
  2598.  
  2599. /*
  2600.  * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  2601.  */
  2602. #define DDERR_INVALIDOBJECT                     MAKE_DDHRESULT( 130 )
  2603.  
  2604. /*
  2605.  * One or more of the parameters passed to the callback function are
  2606.  * incorrect.
  2607.  */
  2608. #define DDERR_INVALIDPARAMS                     E_INVALIDARG
  2609.  
  2610. /*
  2611.  * pixel format was invalid as specified
  2612.  */
  2613. #define DDERR_INVALIDPIXELFORMAT                MAKE_DDHRESULT( 145 )
  2614.  
  2615. /*
  2616.  * Rectangle provided was invalid.
  2617.  */
  2618. #define DDERR_INVALIDRECT                       MAKE_DDHRESULT( 150 )
  2619.  
  2620. /*
  2621.  * Operation could not be carried out because one or more surfaces are locked
  2622.  */
  2623. #define DDERR_LOCKEDSURFACES                    MAKE_DDHRESULT( 160 )
  2624.  
  2625. /*
  2626.  * There is no 3D present.
  2627.  */
  2628. #define DDERR_NO3D                              MAKE_DDHRESULT( 170 )
  2629.  
  2630. /*
  2631.  * Operation could not be carried out because there is no alpha accleration
  2632.  * hardware present or available.
  2633.  */
  2634. #define DDERR_NOALPHAHW                         MAKE_DDHRESULT( 180 )
  2635.  
  2636.  
  2637. /*
  2638.  * no clip list available
  2639.  */
  2640. #define DDERR_NOCLIPLIST                        MAKE_DDHRESULT( 205 )
  2641.  
  2642. /*
  2643.  * Operation could not be carried out because there is no color conversion
  2644.  * hardware present or available.
  2645.  */
  2646. #define DDERR_NOCOLORCONVHW                     MAKE_DDHRESULT( 210 )
  2647.  
  2648. /*
  2649.  * Create function called without DirectDraw object method SetCooperativeLevel
  2650.  * being called.
  2651.  */
  2652. #define DDERR_NOCOOPERATIVELEVELSET             MAKE_DDHRESULT( 212 )
  2653.  
  2654. /*
  2655.  * Surface doesn't currently have a color key
  2656.  */
  2657. #define DDERR_NOCOLORKEY                        MAKE_DDHRESULT( 215 )
  2658.  
  2659. /*
  2660.  * Operation could not be carried out because there is no hardware support
  2661.  * of the dest color key.
  2662.  */
  2663. #define DDERR_NOCOLORKEYHW                      MAKE_DDHRESULT( 220 )
  2664.  
  2665. /*
  2666.  * No DirectDraw support possible with current display driver
  2667.  */
  2668. #define DDERR_NODIRECTDRAWSUPPORT               MAKE_DDHRESULT( 222 )
  2669.  
  2670. /*
  2671.  * Operation requires the application to have exclusive mode but the
  2672.  * application does not have exclusive mode.
  2673.  */
  2674. #define DDERR_NOEXCLUSIVEMODE                   MAKE_DDHRESULT( 225 )
  2675.  
  2676. /*
  2677.  * Flipping visible surfaces is not supported.
  2678.  */
  2679. #define DDERR_NOFLIPHW                          MAKE_DDHRESULT( 230 )
  2680.  
  2681. /*
  2682.  * There is no GDI present.
  2683.  */
  2684. #define DDERR_NOGDI                             MAKE_DDHRESULT( 240 )
  2685.  
  2686. /*
  2687.  * Operation could not be carried out because there is no hardware present
  2688.  * or available.
  2689.  */
  2690. #define DDERR_NOMIRRORHW                        MAKE_DDHRESULT( 250 )
  2691.  
  2692. /*
  2693.  * Requested item was not found
  2694.  */
  2695. #define DDERR_NOTFOUND                          MAKE_DDHRESULT( 255 )
  2696.  
  2697. /*
  2698.  * Operation could not be carried out because there is no overlay hardware
  2699.  * present or available.
  2700.  */
  2701. #define DDERR_NOOVERLAYHW                       MAKE_DDHRESULT( 260 )
  2702.  
  2703. /*
  2704.  * Operation could not be carried out because there is no appropriate raster
  2705.  * op hardware present or available.
  2706.  */
  2707. #define DDERR_NORASTEROPHW                      MAKE_DDHRESULT( 280 )
  2708.  
  2709. /*
  2710.  * Operation could not be carried out because there is no rotation hardware
  2711.  * present or available.
  2712.  */
  2713. #define DDERR_NOROTATIONHW                      MAKE_DDHRESULT( 290 )
  2714.  
  2715. /*
  2716.  * Operation could not be carried out because there is no hardware support
  2717.  * for stretching
  2718.  */
  2719. #define DDERR_NOSTRETCHHW                       MAKE_DDHRESULT( 310 )
  2720.  
  2721. /*
  2722.  * DirectDrawSurface is not in 4 bit color palette and the requested operation
  2723.  * requires 4 bit color palette.
  2724.  */
  2725. #define DDERR_NOT4BITCOLOR                      MAKE_DDHRESULT( 316 )
  2726.  
  2727. /*
  2728.  * DirectDrawSurface is not in 4 bit color index palette and the requested
  2729.  * operation requires 4 bit color index palette.
  2730.  */
  2731. #define DDERR_NOT4BITCOLORINDEX                 MAKE_DDHRESULT( 317 )
  2732.  
  2733. /*
  2734.  * DirectDraw Surface is not in 8 bit color mode and the requested operation
  2735.  * requires 8 bit color.
  2736.  */
  2737. #define DDERR_NOT8BITCOLOR                      MAKE_DDHRESULT( 320 )
  2738.  
  2739. /*
  2740.  * Operation could not be carried out because there is no texture mapping
  2741.  * hardware present or available.
  2742.  */
  2743. #define DDERR_NOTEXTUREHW                       MAKE_DDHRESULT( 330 )
  2744.  
  2745. /*
  2746.  * Operation could not be carried out because there is no hardware support
  2747.  * for vertical blank synchronized operations.
  2748.  */
  2749. #define DDERR_NOVSYNCHW                         MAKE_DDHRESULT( 335 )
  2750.  
  2751. /*
  2752.  * Operation could not be carried out because there is no hardware support
  2753.  * for zbuffer blting.
  2754.  */
  2755. #define DDERR_NOZBUFFERHW                       MAKE_DDHRESULT( 340 )
  2756.  
  2757. /*
  2758.  * Overlay surfaces could not be z layered based on their BltOrder because
  2759.  * the hardware does not support z layering of overlays.
  2760.  */
  2761. #define DDERR_NOZOVERLAYHW                      MAKE_DDHRESULT( 350 )
  2762.  
  2763. /*
  2764.  * The hardware needed for the requested operation has already been
  2765.  * allocated.
  2766.  */
  2767. #define DDERR_OUTOFCAPS                         MAKE_DDHRESULT( 360 )
  2768.  
  2769. /*
  2770.  * DirectDraw does not have enough memory to perform the operation.
  2771.  */
  2772. #define DDERR_OUTOFMEMORY                       E_OUTOFMEMORY
  2773.  
  2774. /*
  2775.  * DirectDraw does not have enough memory to perform the operation.
  2776.  */
  2777. #define DDERR_OUTOFVIDEOMEMORY                  MAKE_DDHRESULT( 380 )
  2778.  
  2779. /*
  2780.  * hardware does not support clipped overlays
  2781.  */
  2782. #define DDERR_OVERLAYCANTCLIP                   MAKE_DDHRESULT( 382 )
  2783.  
  2784. /*
  2785.  * Can only have ony color key active at one time for overlays
  2786.  */
  2787. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE      MAKE_DDHRESULT( 384 )
  2788.  
  2789. /*
  2790.  * Access to this palette is being refused because the palette is already
  2791.  * locked by another thread.
  2792.  */
  2793. #define DDERR_PALETTEBUSY                       MAKE_DDHRESULT( 387 )
  2794.  
  2795. /*
  2796.  * No src color key specified for this operation.
  2797.  */
  2798. #define DDERR_COLORKEYNOTSET                    MAKE_DDHRESULT( 400 )
  2799.  
  2800. /*
  2801.  * This surface is already attached to the surface it is being attached to.
  2802.  */
  2803. #define DDERR_SURFACEALREADYATTACHED            MAKE_DDHRESULT( 410 )
  2804.  
  2805. /*
  2806.  * This surface is already a dependency of the surface it is being made a
  2807.  * dependency of.
  2808.  */
  2809. #define DDERR_SURFACEALREADYDEPENDENT           MAKE_DDHRESULT( 420 )
  2810.  
  2811. /*
  2812.  * Access to this surface is being refused because the surface is already
  2813.  * locked by another thread.
  2814.  */
  2815. #define DDERR_SURFACEBUSY                       MAKE_DDHRESULT( 430 )
  2816.  
  2817. /*
  2818.  * Access to this surface is being refused because no driver exists
  2819.  * which can supply a pointer to the surface.
  2820.  * This is most likely to happen when attempting to lock the primary
  2821.  * surface when no DCI provider is present.
  2822.  */
  2823. #define DDERR_CANTLOCKSURFACE                   MAKE_DDHRESULT( 435 )
  2824.  
  2825. /*
  2826.  * Access to Surface refused because Surface is obscured.
  2827.  */
  2828. #define DDERR_SURFACEISOBSCURED                 MAKE_DDHRESULT( 440 )
  2829.  
  2830. /*
  2831.  * Access to this surface is being refused because the surface is gone.
  2832.  * The DIRECTDRAWSURFACE object representing this surface should 
  2833.  * have Restore called on it.
  2834.  */
  2835. #define DDERR_SURFACELOST                       MAKE_DDHRESULT( 450 )
  2836.  
  2837. /*
  2838.  * The requested surface is not attached.
  2839.  */
  2840. #define DDERR_SURFACENOTATTACHED                MAKE_DDHRESULT( 460 )
  2841.  
  2842. /*
  2843.  * Height requested by DirectDraw is too large.
  2844.  */
  2845. #define DDERR_TOOBIGHEIGHT                      MAKE_DDHRESULT( 470 )
  2846.  
  2847. /*
  2848.  * Size requested by DirectDraw is too large --  The individual height and
  2849.  * width are OK.
  2850.  */
  2851. #define DDERR_TOOBIGSIZE                        MAKE_DDHRESULT( 480 )
  2852.  
  2853. /*
  2854.  * Width requested by DirectDraw is too large.
  2855.  */
  2856. #define DDERR_TOOBIGWIDTH                       MAKE_DDHRESULT( 490 )
  2857.  
  2858. /*
  2859.  * Action not supported.
  2860.  */
  2861. #define DDERR_UNSUPPORTED                       E_NOTIMPL
  2862.  
  2863. /*
  2864.  * FOURCC format requested is unsupported by DirectDraw
  2865.  */
  2866. #define DDERR_UNSUPPORTEDFORMAT                 MAKE_DDHRESULT( 510 )
  2867.  
  2868. /*
  2869.  * Bitmask in the pixel format requested is unsupported by DirectDraw
  2870.  */
  2871. #define DDERR_UNSUPPORTEDMASK                   MAKE_DDHRESULT( 520 )
  2872.  
  2873. /*
  2874.  * vertical blank is in progress
  2875.  */
  2876. #define DDERR_VERTICALBLANKINPROGRESS           MAKE_DDHRESULT( 537 )
  2877.  
  2878. /*
  2879.  * Informs DirectDraw that the previous Blt which is transfering information
  2880.  * to or from this Surface is incomplete.
  2881.  */
  2882. #define DDERR_WASSTILLDRAWING                   MAKE_DDHRESULT( 540 )
  2883.  
  2884. /*
  2885.  * Rectangle provided was not horizontally aligned on reqd. boundary
  2886.  */
  2887. #define DDERR_XALIGN                            MAKE_DDHRESULT( 560 )
  2888.  
  2889. /*
  2890.  * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  2891.  * identifier.
  2892.  */
  2893. #define DDERR_INVALIDDIRECTDRAWGUID             MAKE_DDHRESULT( 561 )
  2894.  
  2895. /*
  2896.  * A DirectDraw object representing this driver has already been created
  2897.  * for this process.
  2898.  */
  2899. #define DDERR_DIRECTDRAWALREADYCREATED          MAKE_DDHRESULT( 562 )
  2900.  
  2901. /*
  2902.  * A hardware only DirectDraw object creation was attempted but the driver
  2903.  * did not support any hardware.
  2904.  */
  2905. #define DDERR_NODIRECTDRAWHW                    MAKE_DDHRESULT( 563 )
  2906.  
  2907. /*
  2908.  * this process already has created a primary surface
  2909.  */
  2910. #define DDERR_PRIMARYSURFACEALREADYEXISTS       MAKE_DDHRESULT( 564 )
  2911.  
  2912. /*
  2913.  * software emulation not available.
  2914.  */
  2915. #define DDERR_NOEMULATION                       MAKE_DDHRESULT( 565 )
  2916.  
  2917. /*
  2918.  * region passed to Clipper::GetClipList is too small.
  2919.  */
  2920. #define DDERR_REGIONTOOSMALL                    MAKE_DDHRESULT( 566 )
  2921.  
  2922. /*
  2923.  * an attempt was made to set a clip list for a clipper objec that
  2924.  * is already monitoring an hwnd.
  2925.  */
  2926. #define DDERR_CLIPPERISUSINGHWND                MAKE_DDHRESULT( 567 )
  2927.  
  2928. /*
  2929.  * No clipper object attached to surface object
  2930.  */
  2931. #define DDERR_NOCLIPPERATTACHED                 MAKE_DDHRESULT( 568 )
  2932.  
  2933. /*
  2934.  * Clipper notification requires an HWND or
  2935.  * no HWND has previously been set as the CooperativeLevel HWND.
  2936.  */
  2937. #define DDERR_NOHWND                            MAKE_DDHRESULT( 569 )
  2938.  
  2939. /*
  2940.  * HWND used by DirectDraw CooperativeLevel has been subclassed,
  2941.  * this prevents DirectDraw from restoring state.
  2942.  */
  2943. #define DDERR_HWNDSUBCLASSED                    MAKE_DDHRESULT( 570 )
  2944.  
  2945. /*
  2946.  * The CooperativeLevel HWND has already been set.
  2947.  * It can not be reset while the process has surfaces or palettes created.
  2948.  */
  2949. #define DDERR_HWNDALREADYSET                    MAKE_DDHRESULT( 571 )
  2950.  
  2951. /*
  2952.  * No palette object attached to this surface.
  2953.  */
  2954. #define DDERR_NOPALETTEATTACHED                 MAKE_DDHRESULT( 572 )
  2955.  
  2956. /*
  2957.  * No hardware support for 16 or 256 color palettes.
  2958.  */
  2959. #define DDERR_NOPALETTEHW                       MAKE_DDHRESULT( 573 )
  2960.  
  2961. /*
  2962.  * If a clipper object is attached to the source surface passed into a
  2963.  * BltFast call.
  2964.  */
  2965. #define DDERR_BLTFASTCANTCLIP                   MAKE_DDHRESULT( 574 )
  2966.  
  2967. /*
  2968.  * No blter.
  2969.  */
  2970. #define DDERR_NOBLTHW                           MAKE_DDHRESULT( 575 )
  2971.  
  2972. /*
  2973.  * No DirectDraw ROP hardware.
  2974.  */
  2975. #define DDERR_NODDROPSHW                        MAKE_DDHRESULT( 576 )
  2976.  
  2977. /*
  2978.  * returned when GetOverlayPosition is called on a hidden overlay
  2979.  */
  2980. #define DDERR_OVERLAYNOTVISIBLE                 MAKE_DDHRESULT( 577 )
  2981.  
  2982. /*
  2983.  * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  2984.  * has never been called on to establish a destionation.
  2985.  */
  2986. #define DDERR_NOOVERLAYDEST                     MAKE_DDHRESULT( 578 )
  2987.  
  2988. /*
  2989.  * returned when the position of the overlay on the destionation is no longer
  2990.  * legal for that destionation.
  2991.  */
  2992. #define DDERR_INVALIDPOSITION                   MAKE_DDHRESULT( 579 )
  2993.  
  2994. /*
  2995.  * returned when an overlay member is called for a non-overlay surface
  2996.  */
  2997. #define DDERR_NOTAOVERLAYSURFACE                MAKE_DDHRESULT( 580 )
  2998.  
  2999. /*
  3000.  * An attempt was made to set the cooperative level when it was already
  3001.  * set to exclusive.
  3002.  */
  3003. #define DDERR_EXCLUSIVEMODEALREADYSET           MAKE_DDHRESULT( 581 )
  3004.  
  3005. /*
  3006.  * An attempt has been made to flip a surface that is not flippable.
  3007.  */
  3008. #define DDERR_NOTFLIPPABLE                      MAKE_DDHRESULT( 582 )
  3009.  
  3010. /*
  3011.  * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  3012.  * created.
  3013.  */
  3014. #define DDERR_CANTDUPLICATE                     MAKE_DDHRESULT( 583 )
  3015.  
  3016. /*
  3017.  * Surface was not locked.  An attempt to unlock a surface that was not
  3018.  * locked at all, or by this process, has been attempted.
  3019.  */
  3020. #define DDERR_NOTLOCKED                         MAKE_DDHRESULT( 584 )
  3021.  
  3022. /*
  3023.  * Windows can not create any more DCs
  3024.  */
  3025. #define DDERR_CANTCREATEDC                      MAKE_DDHRESULT( 585 )
  3026.  
  3027. /*
  3028.  * No DC was ever created for this surface.
  3029.  */
  3030. #define DDERR_NODC                              MAKE_DDHRESULT( 586 )
  3031.  
  3032. /*
  3033.  * This surface can not be restored because it was created in a different
  3034.  * mode.
  3035.  */
  3036. #define DDERR_WRONGMODE                         MAKE_DDHRESULT( 587 )
  3037.  
  3038. /*
  3039.  * This surface can not be restored because it is an implicitly created
  3040.  * surface.
  3041.  */
  3042. #define DDERR_IMPLICITLYCREATED                 MAKE_DDHRESULT( 588 )
  3043.  
  3044. /*
  3045.  * The surface being used is not a palette-based surface
  3046.  */
  3047. #define DDERR_NOTPALETTIZED                     MAKE_DDHRESULT( 589 )
  3048.  
  3049.  
  3050. /*
  3051.  * The display is currently in an unsupported mode
  3052.  */
  3053. #define DDERR_UNSUPPORTEDMODE                   MAKE_DDHRESULT( 590 )
  3054.  
  3055. /*
  3056.  * Operation could not be carried out because there is no mip-map
  3057.  * texture mapping hardware present or available.
  3058.  */
  3059. #define DDERR_NOMIPMAPHW                        MAKE_DDHRESULT( 591 )
  3060.  
  3061. /*
  3062.  * The requested action could not be performed because the surface was of
  3063.  * the wrong type.
  3064.  */
  3065. #define DDERR_INVALIDSURFACETYPE                MAKE_DDHRESULT( 592 )
  3066.  
  3067.  
  3068.  
  3069. /*
  3070.  * A DC has already been returned for this surface. Only one DC can be 
  3071.  * retrieved per surface.
  3072.  */
  3073. #define DDERR_DCALREADYCREATED                  MAKE_DDHRESULT( 620 )
  3074.  
  3075. /*
  3076.  * The attempt to page lock a surface failed.
  3077.  */
  3078. #define DDERR_CANTPAGELOCK                      MAKE_DDHRESULT( 640 )
  3079.  
  3080. /*
  3081.  * The attempt to page unlock a surface failed.
  3082.  */
  3083. #define DDERR_CANTPAGEUNLOCK                    MAKE_DDHRESULT( 660 )
  3084.  
  3085. /*
  3086.  * An attempt was made to page unlock a surface with no outstanding page locks.
  3087.  */
  3088. #define DDERR_NOTPAGELOCKED                     MAKE_DDHRESULT( 680 )
  3089.  
  3090. /*
  3091.  * An attempt was made to invoke an interface member of a DirectDraw object
  3092.  * created by CoCreateInstance() before it was initialized.
  3093.  */
  3094. #define DDERR_NOTINITIALIZED                    CO_E_NOTINITIALIZED
  3095.  
  3096. /* Alpha bit depth constants */
  3097.  
  3098.  
  3099. #ifdef __cplusplus
  3100. };
  3101. #endif
  3102.  
  3103. #pragma option pop
  3104. #endif
  3105.